-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first testing about pacman-like arguments
- Loading branch information
1 parent
ba7c7b2
commit f6aa268
Showing
2 changed files
with
81 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef ARGS_HPP | ||
#define ARGS_HPP | ||
|
||
#include <string> | ||
#include <sys/types.h> | ||
#include <vector> | ||
#include <getopt.h> | ||
|
||
enum OperationType { | ||
OP_SYNC = 1, // when you run taur -S[args] | ||
OP_SYSUPGRADE, | ||
OP_PACMAN // when it's different from -S, we gonna use pacman | ||
}; | ||
|
||
struct Operation_t { | ||
u_short op; | ||
u_short op_sync; | ||
u_short op_upgrade; | ||
|
||
std::vector<std::string> args; | ||
}; | ||
|
||
extern struct Operation_t* operation; | ||
|
||
int parseargs(int argc, char* argv[]); | ||
int parsearg_op(int opt); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters