mkbootinitc - vx32 - Local 9vx git repository for patches.
 (HTM) git clone git://r-36.net/vx32
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       mkbootinitc (485B)
       ---
            1 #!/bin/sh
            2 
            3 echo '/* AUTOGENERATED BY mkbootinitc */
            4 
            5 #include        "u.h"
            6 #include        "lib.h"
            7 #include        "mem.h"
            8 #include        "dat.h"
            9 #include        "fns.h"
           10 
           11 void
           12 bootinit(void)
           13 {'
           14 
           15 echo $* | awk '
           16 {
           17         for(i = 1; i <= NF; i++){
           18                 a[i] = $i
           19                 # C var names cannot start with a digit
           20                 b[i] = ($i ~ /^[0-9]/) ? "_"$i : $i
           21                 print "        extern uchar "b[i]"code[];"
           22                 print "        extern long "b[i]"len;"
           23         }
           24         print ""
           25         for(i = 1; i <= NF; i++){
           26                 print "        addbootfile(\""a[i]"\", "b[i]"code, "b[i]"len);"
           27         }
           28 }
           29 '
           30 echo '}'