tWin32 getopt() and index() functions altered to match the Unix prototypes - vaccinewars - be a doctor and try to vaccinate the world
HTML git clone git://src.adamsgaard.dk/vaccinewars
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit d575d43a2095a190ad01076332009a6b08071aa7
DIR parent b97f07e9aabedfec9365d87fb8566aae993adff5
HTML Author: Ben Webb <ben@salilab.org>
Date: Fri, 12 Oct 2001 16:37:18 +0000
Win32 getopt() and index() functions altered to match the Unix prototypes
Diffstat:
M src/dopeos.c | 4 ++--
M src/dopeos.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
DIR diff --git a/src/dopeos.c b/src/dopeos.c
t@@ -184,14 +184,14 @@ int bgetch() {
return (int)(Buffer[0]);
}
-char *index(char *str,char ch) {
+char *index(const char *str,int ch) {
int i;
for (i=0;i<strlen(str);i++) { if (str[i]==ch) return str+i; }
return NULL;
}
int apos=0;
-int getopt(int argc,char *argv[],char *str) {
+int getopt(int argc,char * const argv[],const char *str) {
int i,c;
char *pt;
while (apos<argc && argv[apos]) {
DIR diff --git a/src/dopeos.h b/src/dopeos.h
t@@ -97,8 +97,8 @@ void mvaddstr(int x,int y,char *str);
void mvaddch(int x,int y,int ch);
int bgetch();
#define erase() clear_screen()
-char *index(char *str,char ch);
-int getopt(int argc,char *argv[],char *str);
+char *index(const char *str,int ch);
+int getopt(int argc,char * const argv[],const char *str);
extern char *optarg;
typedef int ssize_t;