home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / gcc / newgccstart.lha / source.lha / stubs / makebase < prev    next >
Encoding:
Text File  |  1994-03-14  |  825 b   |  27 lines

  1. /* makebase Generiert C-Programme aus der Libraryliste */
  2.  
  3. CALL OPEN(infile,"library.list","r")
  4.  
  5. DO FOREVER
  6.   line=READLN(infile)
  7.   IF line=="" THEN BREAK
  8.  
  9.   PARSE VALUE line WITH basename libname .
  10.   PARSE VALUE libname WITH libshort ".library"
  11.  
  12.   CALL OPEN(outfile,libshort"base.c","w")
  13.   CALL WRITELN(outfile,"/* Machine-generated C-file- do not edit ! */")
  14.   CALL WRITELN(outfile,"struct Library;")
  15.   CALL WRITELN(outfile,"struct Library *"basename"=0l;")
  16.   CALL WRITELN(outfile,"extern char __"libshort"name[];")
  17.   CALL WRITELN(outfile,"static char *a=__"libshort"name;")
  18.   CALL CLOSE(outfile)
  19.  
  20.   CALL OPEN(outfile,libshort"name.c","w")
  21.   CALL WRITELN(outfile,"/* Machine-generated C-file- do not edit ! */")
  22.   CALL WRITELN(outfile,"char __"libshort"name[]="""libname""";")
  23.   CALL CLOSE(outfile)
  24. END
  25.  
  26. CALL CLOSE(infile)
  27.