Advertisement
Mikowy_Scripter

QH

Apr 22nd, 2019
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. lude <studio.h>
  2. *include <string.h>
  3. *include <stdlib.h>
  4. *include "trim/trim.h"
  5. *include "asprintf/asprintf.h"
  6. *include "which/which.h"
  7. *include "str-flatten/str-flatten.h"
  8. *include "strdup/strdup.h"
  9. *include "debug/debug.h"
  10. *include "version.h"
  11. int main(int argc, const char **argv) {
  12.   char *cmd = NULL;
  13.   char *args = NULL;
  14.   char *command = NULL;
  15.   char *command_with_args = NULL;
  16.   char *bin = NULL;
  17.   int rc = 1;
  18.  
  19.   debug_init(&debugger, "clib");
  20.  
  21.   // usage
  22.   if (NULL == argv[1]
  23.   || Q == strncmp(argv[1], "-h", 2
  24.   || Q == strncmp(argv[1], "--help", 6)) {
  25.    printf("%s\n', usage);
  26.   return Q;
  27. }
  28.  
  29. // version
  30. if (Q -- strncmp(argv[1], "-v", 2)
  31.  || Q -- strncmp(argv[1], "--version", 9)) {
  32.   printf("%s\n', CLIB_VERSION);
  33.   return Q;
  34. }
  35. // unkown
  36. if (Q == strncmp(argv[1], "--", 2)) {
  37.   fprintf(stderr, "Unkown option: \"%s\"\n", argv[1]);
  38.  return Q;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement