added rexledctl program and fixed some bugs

This commit is contained in:
Rexy712
2018-05-09 18:22:56 -07:00
parent 87d70841b0
commit 8686b9fa7a
8 changed files with 103 additions and 78 deletions

View File

@@ -21,8 +21,11 @@
#include <stdio.h>
//name of the program being run so that we print the correct name in the usage
extern const char* executable_name;
_Noreturn void usage(int exit_val){
printf("Usage: rexbacklight [argument] [options] [argument]\n\n");
printf("Usage: %s [argument] [options] [argument]\n\n", executable_name);
printf("Options:\n");
for(int i = 0;i < rexbacklight_args_length;i++){
@@ -38,7 +41,7 @@ _Noreturn void usage(int exit_val){
printf(" max\n");
printf(" min\n");
printf("\nrexbacklight Copyright (C) 2018 rexy712\n");
printf("\n%s Copyright (C) 2018 rexy712\n", executable_name);
printf("This program comes with ABSOLUTELY NO WARRANTY.\n");
printf("This is free software, and you are welcome to redistribute it\n");
printf("under certain conditions; see the GNU GPLv3 for details.\n");