#ifdef HAVE_CONFIG_H
# include <config.h>
- /* On some systems, Emacs defines static as nothing for the sake
- of unexec. We don't want that here since we don't use unexec. */
+ /* This is probably not necessary any more. On some systems, config.h
+ used to define static as nothing for the sake of unexec. We don't
+ want that here since we don't use unexec. None of these systems
+ are supported any more, but the idea is still mentioned in
+ etc/PROBLEMS. */
# undef static
# ifndef PTR /* for XEmacs */
# define PTR void *
#endif /* MSDOS */
#ifdef WINDOWSNT
-# include <stdlib.h>
# include <fcntl.h>
-# include <string.h>
# include <direct.h>
# include <io.h>
# define MAXPATHLEN _MAX_PATH
# define HAVE_GETCWD
# endif /* undef HAVE_GETCWD */
#else /* not WINDOWSNT */
-# ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <string.h>
-# else /* no standard C headers */
- extern char *getenv (const char *);
- extern char *strcpy (char *, const char *);
- extern char *strncpy (char *, const char *, unsigned long);
- extern char *strcat (char *, const char *);
- extern char *strncat (char *, const char *, unsigned long);
- extern int strcmp (const char *, const char *);
- extern int strncmp (const char *, const char *, unsigned long);
- extern int system (const char *);
- extern unsigned long strlen (const char *);
- extern void *malloc (unsigned long);
- extern void *realloc (void *, unsigned long);
- extern void exit (int);
- extern void free (void *);
- extern void *memmove (void *, const void *, unsigned long);
-# define EXIT_SUCCESS 0
-# define EXIT_FAILURE 1
-# endif
#endif /* !WINDOWSNT */
#include <unistd.h>
# endif
#endif /* HAVE_UNISTD_H */
+#include <stdlib.h>
+#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
struct C_stab_entry { const char *name; int c_ext; enum sym_type type; };
/* maximum key range = 33, duplicates = 0 */
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
-inline
-#endif
-#endif
-static unsigned int
+static inline unsigned int
hash (register const char *str, register unsigned int len)
{
static unsigned char asso_values[] =
else if (cp[0] != '/')
cp = slashp;
#endif
-#ifdef HAVE_MEMMOVE
memmove (cp, slashp + 3, strlen (slashp + 2));
-#else
- /* Overlapping copy isn't really okay */
- strcpy (cp, slashp + 3);
-#endif
slashp = cp;
continue;
}
else if (slashp[2] == '/' || slashp[2] == '\0')
{
-#ifdef HAVE_MEMMOVE
memmove (slashp, slashp + 2, strlen (slashp + 1));
-#else
- strcpy (slashp, slashp + 2);
-#endif
continue;
}
}