summaryrefslogtreecommitdiff
path: root/avr/getopt-min.c
diff options
context:
space:
mode:
authorLeo C2015-06-11 17:43:28 +0200
committerLeo C2015-06-11 17:43:28 +0200
commit1157e75889d3d6d23d1e2514f401cd5b354bd149 (patch)
treeedad2bcaddaec49a18a1b4bac2b813ce9e5a36bf /avr/getopt-min.c
parent8506d791786eea8ee55db5418a8f646bb2dd3a6d (diff)
parent057817cb1dc71416bc798b5cd592acfcea87efaa (diff)
downloadz180-stamp-1157e75889d3d6d23d1e2514f401cd5b354bd149.zip
Merge branch 'master' into cmdline_edit
Diffstat (limited to 'avr/getopt-min.c')
-rw-r--r--avr/getopt-min.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/avr/getopt-min.c b/avr/getopt-min.c
index 8e5dd6c..f5ad912 100644
--- a/avr/getopt-min.c
+++ b/avr/getopt-min.c
@@ -1,6 +1,3 @@
-#include "common.h"
-
-
/*
* Minimum getopt, original version was:
*/
@@ -13,7 +10,8 @@
*/
/* $Id: getopt.c,v 1.2 1992/12/07 11:12:52 nickc Exp $ */
-#include <string.h>
+#include "common.h" /* definition of FLASH */
+#include <string.h>
int optind = 1; /* next argv[] index */
char *optarg; /* option parameter if any */
@@ -40,7 +38,7 @@ getopt( /* returns letter, '?', EOF */
)
return -1;
}
-
+
c = argv[optind][sp]; /* option letter */
osp = sp++; /* get ready for next letter */
@@ -72,4 +70,3 @@ getopt( /* returns letter, '?', EOF */
return c;
}
-