Merge pull request #193 from MaZderMind/getoptint

change getopt return storage from char to int
This commit is contained in:
James Laird
2013-04-02 16:54:10 -07:00
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -49,7 +49,8 @@ static int init(int argc, char **argv) {
optind = 0;
// some platforms apparently require optreset = 1; - which?
char opt, *mid;
int opt;
char *mid;
while ((opt = getopt(argc, argv, "d:i:n:o:")) > 0) {
switch (opt) {
case 'd':
+1 -1
View File
@@ -73,7 +73,7 @@ void usage(char *progname) {
}
int parse_options(int argc, char **argv) {
char opt;
int opt;
while ((opt = getopt(argc, argv, "+hvp:a:o:b:")) > 0) {
switch (opt) {
default: