pkgdesc='Database System'
arch=('i686' 'x86_64')
license=('BSD')
-pkgrel='6'
+pkgrel='7'
makedepends=('byacc')
source=('dataworks::svn+http://sw.nishi.boats/svn/nishi-dataworks/trunk#revision=')
sha256sums=('SKIP')
i++;
authfile = argv[i];
auth = true;
+ } else if(option(argv[i], "h", "help")) {
+ printf("\n");
+ printf("Usage: %s [options] database\n", argv[0]);
+ printf("You can use double-dash or slash for long-format flag, and single-dash or slash for short-foramt flag.\n");
+ printf("Options:\n");
+ printf("\t-p --port [comport] Specify the modem port\n");
+ printf("\t-l --login [path] Specify the authentication file\n");
+ exit(0);
} else {
fprintf(stderr, "Invalid option: %s\n", argv[i]);
return 1;
if(has_pass) {
int shift = i;
struct auth_entry** old_entries = entries;
- for(i = 0; old_entries[i] != NULL; i++);
+ for(i = 0; old_entries[i] != NULL; i++)
+ ;
entries = malloc(sizeof(*entries) * (i + 2));
for(i = 0; old_entries[i] != NULL; i++) entries[i] = old_entries[i];
free(old_entries);
i++;
authfile = argv[i];
auth = true;
+ } else if(option(argv[i], "h", "help")) {
+ printf("\n");
+ printf("Usage: %s [options] database\n", argv[0]);
+ printf("You can use double-dash or slash for long-format flag, and single-dash or slash for short-foramt flag.\n");
+ printf("Options:\n");
+ printf("\t-p --port [port] Specify the port to be listened on\n");
+ printf("\t-l --login [path] Specify the authentication file\n");
+ exit(0);
} else {
fprintf(stderr, "Invalid option: %s\n", argv[i]);
return 1;