libsheepy

C lib for handling text files, strings and json like data structure with an object oriented system
git clone https://spartatek.se/git/libsheepy.git
Log | Files | Refs | README | LICENSE

normalize.c (484B)


      1 //
      2 
      3 #include "../release/libsheepyObject.h"
      4 
      5 #define internal static
      6 
      7 
      8 #ifndef unitTest
      9 #endif
     10 int MAIN(int ARGC, char** ARGV);
     11 
     12 int argc; char **argv;
     13 
     14 #ifndef unitTest
     15 // Remove main when running the unit tests
     16 #define MAIN   main
     17 #endif
     18 int MAIN(int ARGC, char** ARGV) {
     19   int dummy UNUSED;
     20 
     21   argc = ARGC; argv = ARGV;;// normalize path
     22 
     23   if (argc < 2) {
     24     puts(BLD RED "Usage: " RST "normalize path");
     25     XFAILURE
     26   }
     27 
     28   char *path = argv[1];
     29 
     30   puts(normalizePath(path));
     31 }