5 int main(int argc
, char* argv
[])
18 printf("Too few arguments\n");
22 prefix
= strdup(argv
[1]);
24 out
= fopen(argv
[2], "wb");
27 printf("Unable to open output file\n");
32 while ((ch
= fgetc(stdin
)) == '#')
34 while ((ch
= fgetc(stdin
)) != '\n' && ch
!= EOF
)
44 while ((ch
= fgetc(stdin
)) != ':' && ch
!= EOF
)
56 while ((ch
= fgetc(stdin
)) == ' ' && ch
!= EOF
)
71 while ((ch
= fgetc(stdin
)) != ' ' && ch
!= EOF
)
82 ext
= strrchr(buf2
, '.');
85 if (0 == strcmp(ext
, ".h"))
95 dot
= strrchr(buf
, '.');
100 fprintf(out
, "%s/.%s.TAG %s/.%s.d %s/%s.%s:%s ", prefix
, buf
, prefix
, buf
,
101 prefix
,buf
,ext
? ext
: "o" , buf2
);
103 while ((ch
= fgetc(stdin
)) != EOF
)