home *** CD-ROM | disk | FTP | other *** search
/ Enter 1998 December / ENTER12_1.iso / Dema / Cad_Proj.ekt / Mega48t / CC / TEXTFILE.C_ / TEXTFILE.C
Encoding:
C/C++ Source or Header  |  1995-01-11  |  907 b   |  27 lines

  1. /**********************************************************************/
  2. #include "std.h"
  3. #include "megatyp.h"
  4. #include "megacad.h"
  5. /**********************************************************************/
  6. char txtbuf[5000];
  7. /**********************************************************************/
  8. short main(
  9.         char *filename,
  10.         char *args )
  11. {
  12.     char  buf[255],lbuf[100];
  13.     short linenum,linecnt = 0,butret = 1, stroffset = 0;
  14.  
  15.     // die Datei strings.txt wird eingelesen
  16.     linenum = ReadTxtFile("strings.txt",txtbuf,5000);
  17.     while( (linecnt < linenum) && (butret != 3) )
  18.     {
  19.         linecnt++;
  20.         sprintf(lbuf,"Zeile : %d",linecnt);
  21.         strcpy(buf,txtbuf + stroffset);
  22.         stroffset += (strlen(buf) + 1);
  23.         butret = Message(lbuf,buf,"OK",NULL,"ABBRUCH",1);
  24.     }
  25. }
  26. /**********************************************************************/
  27.