Made integer on command line work without '=' and removed excess strcmp
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user