delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/30/16:30:45

Newsgroups: comp.os.msdos.djgpp
X-Comment-To: All
From: Oleg Ossovitskii <Oleg DOT Ossovitskii AT p20 DOT f44 DOT n478 DOT z2 DOT fidonet DOT org>
Date: Thu, 29 Jul 99 11:51:49 +0300
Subject: Bug of feature?
Message-ID: <933253275@p20.f44.n478.z2.FidoNet.ftn>
Organization: Without C we'd have BASI, PASAL, OBOL ;-)
X-FTN-AREA: HURRICANE.COMP.OS.MSDOS.DJGPP
X-FTN-MSGID: 2:478/44 DOT 20 AT FidoNet DOT org 37a0509b
X-FTN-PID: GED386 3.0.1-asa7
X-FTN-CHRS: IBMPC 2
X-FTN-RealName: οΜΕΗ οΜΕΗΟΧΙή οΣΟΧΙΓΛΙΚ ICQ UIN: 28860835
X-FTN-NickName: Stryker
X-FTN-Location: Kalinigrad, West Russia
X-FTN-GC: Geek-R 1.3 GPR/CC/IT/* a20 d- H- s++:- C++ c2 hw- B- F I cc pn++ D++
X-FTN-GC: O U- W+ M pr+ ln++ sl sw+ PS+ PE+ eq+ Y+ h+ sx++ b+:++ g3 m++ R- tv-
X-FTN-GC: hu e:++ E:- mt+ ph+ UF co+ ck- ho- n p r x+ A+ he-- sm- sp-
X-FTN-Tearline: Microsoft FidoNet Explorer/386 3.0.1-asa7 -={SCS.METALSPORT $$ }=-
X-FTN-Origin: Without C we'd have BASI, PASAL, OBOL ;-) (2:478/44.20)
X-FTN-SEEN-BY: 478/44
X-FTN-PATH: 478/44
X-FTN-PATH: 478/44
Lines: 36
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello, All, how do You do?

In my program i cut big file on pieces with size 'splitSize'.

==================  Begin of Windows Clipboard  =================

  while( fgets( buf, sizeof(buf), inStream)) // read string from input stream
  {
    fputs( buf, outStream); // write string to destination stream (file)
        // in Borland C++ all works correctly, but in Djgpp
        // file split on pieces on 16KB only ! Why? This is bug or feature?
    if( filelength( fileno( outStream)) >= splitSize) // check size of file
    {
      if(curColor > 15) curColor = 1;  // write files on screen
      textcolor( curColor++);          // with different colors
      cprintf("%s\r\n", currentFName); // cyclic from 1..15
      fclose(outStream);               // close file
          // create next filename
      sprintf( currentFName, "%s.%03d", name, ++numOfFile);
          // open file with new name
      if( !(outStream = fopen( currentFName, "w+b")))
      {
        fprintf(stderr, "Can't open file '%s' for write.\n", argv[1]);
        return 3;
      }
    }
  }

===================  End of Windows Clipboard  ==================


WBR, Oleg Ossovitskii      MailTo: stryker AT kaliningrad DOT ru
PGP key fingerprint: 54F5 065A B916 D43C 49BA  4E1F F0DD 67C4 CBC6 422F

... Girlfriend pregnant - (M)arry (I)gnore (A)bort

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019