Made integer on command line work without '=' and removed excess strcmp

This commit is contained in:
rexy712
2018-01-20 14:29:48 -08:00
parent a3c32e5e7f
commit dda74af557
3 changed files with 64 additions and 56 deletions

View File

@@ -19,6 +19,8 @@
#ifndef RECBACKLIGHT_CMD_H
#define REXBACKLIGHT_CMD_H
#define OP_INC 1
#define OP_DEC 2
#define OP_SET 4
#define OP_LIST 8
#define OP_GET 128
@@ -52,7 +54,7 @@ struct arg_values{
const char* device;
//What value to put in the backlight file
char* delta;
float delta;
//How many seconds to transition
int fade_duration;
@@ -64,6 +66,6 @@ struct arg_values{
void free_cmd_args(struct arg_values* a);
struct arg_values process_cmd_args(int argc, char** argv);
int process_op(char* arg, float min, float current, float max);
int process_op(struct arg_values* arg, float min, float current, float max);
#endif