ciabatta/test/inctoarg.c

23 lines
431 B
C
Raw Normal View History

#include <stdio.h>
#include <stdlib.h>
2022-06-02 13:08:59 +00:00
int main() {
2022-06-02 13:08:59 +00:00
char *include = getenv("INCLUDE");
printf(" ");
while (*include != 0) {
2022-06-02 13:08:59 +00:00
printf("-I \"");
while (*include != ';' && *include != 0) {
2022-06-02 19:55:10 +00:00
if (*include == '\\') {
printf("/");
} else {
printf("%c", *include);
}
*include++;
2022-06-02 13:08:59 +00:00
}
if (*include == ';') {
2022-06-02 13:08:59 +00:00
++include;
}
printf("\" ");
}
}