wip
This commit is contained in:
parent
2b3b709e22
commit
45751c6e67
4 changed files with 31 additions and 3 deletions
22
src/main.c
22
src/main.c
|
|
@ -1,4 +1,24 @@
|
|||
#include <stdio.h>
|
||||
#include <taiga.h>
|
||||
|
||||
int main(int argc, char** argv){
|
||||
int i;
|
||||
char* action;
|
||||
int target_argc = 0;
|
||||
char** target_argv = malloc(sizeof(*target_argv));
|
||||
target_argv[0] = NULL;
|
||||
|
||||
for(i = 1; i < argc; i++){
|
||||
if(argv[i][0] == '-'){
|
||||
if(action != NULL) continue;
|
||||
}else{
|
||||
if(action != NULL) continue;
|
||||
action = argv[i];
|
||||
|
||||
free(target_argv);
|
||||
target_argc = argc - i - 1;
|
||||
target_argv = &argv[i + 1];
|
||||
}
|
||||
}
|
||||
|
||||
if(action == NULL) action = "site";
|
||||
}
|
||||
|
|
|
|||
8
src/taiga.h
Normal file
8
src/taiga.h
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef __TAIGA_H__
|
||||
#define __TAIGA_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue