Skip to content

Instantly share code, notes, and snippets.

@NuckChorris
Created August 14, 2013 08:12
Show Gist options
  • Select an option

  • Save NuckChorris/6228941 to your computer and use it in GitHub Desktop.

Select an option

Save NuckChorris/6228941 to your computer and use it in GitHub Desktop.
#include "main.h"
#include "utils.h"
#include "acpi.h"
struct options {
char output[32][16],
char battery[]
};
int main
(int argc, char **argv)
{
int ch;
char *last;
while ((ch = getopt_long(argc, argv, short_options, long_options, NULL)) != -1) {
output
switch (ch) {
case 'b':
printf("b=%s", optarg);
break;
case 'o':
printf("o=%s", optarg);
output[1] = strtok_r();
break;
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment