#include <stdio.h>
#include <ctype.h>
#include <errno.h>
-#ifndef errno
- extern int errno;
-#endif
#include <sys/types.h>
#include <sys/stat.h>
char **interpreters;
} language;
-extern char *getenv ();
-
typedef struct node_st
{ /* sorting structure */
char *name; /* function or type name */
char *skip_non_spaces (char *cp);
char *savenstr (char *cp, int len);
char *savestr (char *cp);
-char *etags_strchr (char *sp, char c);
-char *etags_strrchr (char *sp, char c);
+char *etags_strchr (const char *sp, int c);
+char *etags_strrchr (const char *sp, int c);
char *etags_getcwd (void);
char *relative_filename (char *file, char *dir);
char *absolute_filename (char *file, char *dir);
/* Let those poor souls who live with DOS 8+3 file name limits get
some solace by treating foo.cgz as if it were foo.c.gz, etc.
Only the first do loop is run if not MSDOS */
+#ifdef MSDOS
do
{
for (compr = compressors; compr->suffix != NULL; compr++)
if (streq (compr->suffix, suffix))
return compr;
-#ifndef MSDOS
- break;
-#endif
if (extptr != NULL)
*extptr = ++suffix;
} while (*suffix != '\0');
+#else
+ for (compr = compressors; compr->suffix != NULL; compr++)
+ if (streq (compr->suffix, suffix))
+ return compr;
+#endif
+
return NULL;
}
/*
* Return the ptr in sp at which the character c last
* appears; NULL if not found
- *
- * Identical to System V strrchr, included for portability.
*/
char *
etags_strrchr (sp, c)
- register char *sp, c;
+ const char *sp;
+ int c;
{
- register char *r;
+ register const char *r;
r = NULL;
do
if (*sp == c)
r = sp;
} while (*sp++);
- return r;
+ return (char *) r;
}
/*
* Return the ptr in sp at which the character c first
* appears; NULL if not found
- *
- * Identical to System V strchr, included for portability.
*/
char *
etags_strchr (sp, c)
- register char *sp, c;
+ const char *sp;
+ int c;
{
do
{
if (*sp == c)
- return sp;
+ return (char *) sp;
} while (*sp++);
return NULL;
}