home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / src / amiga / libnix-0.7-src.lha / libnix-0.7 / sources / headers / makebase < prev    next >
Encoding:
Text File  |  1994-12-12  |  844 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,"libbases/"libshort".c","w")
  13.   CALL WRITELN(outfile,"/* Machine-generated C-file- do not edit ! */")
  14.   CALL WRITELN(outfile,"#include <stabs.h>")
  15.   CALL WRITELN(outfile,"extern char __"libshort"name[];")
  16.   CALL WRITELN(outfile,"void *"basename"[2]={ 0l,__"libshort"name };")
  17.   CALL WRITELN(outfile,"ADD2LIB("basename");")
  18.   CALL CLOSE(outfile)
  19.  
  20.   CALL OPEN(outfile,"libnames/"libshort".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.