cfp.c (847B)
1 //: generator/pp comment config 2 //:not cScript 3 #include "../release/libsheepy.h" 4 //:end 5 6 #define internal static 7 8 #include <stdlib.h> 9 #include <stdio.h> 10 11 #ifndef unitTest 12 #endif 13 int MAIN(int ARGC, char** ARGV); 14 15 int argc; char **argv; 16 17 #ifndef unitTest 18 // Remove main when running the unit tests 19 #define MAIN main 20 #endif 21 int MAIN(int ARGC, char** ARGV) { 22 char **list = NULL; 23 24 argc = ARGC; argv = ARGV;;// printf("%s\n", current path in front of the arguments); 25 26 // Steps: 27 // get current path 28 // check number of arguments 29 // print current path in front of the arguments 30 31 // get current path 32 char *cwd = getCwd(); 33 34 // check number of arguments 35 if (argc < 2) { 36 XSUCCESS 37 } 38 39 // print current path in front of the arguments 40 range(i, argc) { 41 char *s = catS(cwd,"/", argv[i]); 42 printf("%s\n", s); 43 free(s); 44 } 45 }