Previous 15994 Revisions Next

r1470 Monday 31st December, 2007 at 19:45:32 UTC by R. Belmont
[SDLMESS] Update to compile on MinGW.
[src/mess/osd/sdl]glob.c

src/mess/osd/sdl/glob.c
r1469r1470
156156
157157static int    compare __P((const void *, const void *));
158158static void    g_Ctoc __P((const Char *, char *));
159static int    g_lstat __P((Char *, struct stat *, glob_t *));
159//static int    g_lstat __P((Char *, struct stat *, glob_t *));
160160static osd_directory   *g_opendir __P((Char *, glob_t *));
161static Char   *g_strchr __P((Char *, int));
161static Char   *g_strchr __P((const Char *, int));
162162#ifdef notdef
163163static Char   *g_strcat __P((Char *, const Char *));
164164#endif
165static int    g_stat __P((Char *, struct stat *, glob_t *));
165//static int    g_stat __P((Char *, struct stat *, glob_t *));
166166static int    glob0 __P((const Char *, glob_t *));
167167static int    glob1 __P((Char *, glob_t *));
168168static int    glob2 __P((Char *, Char *, Char *, glob_t *));
r1469r1470
239239   if (pattern[0] == LBRACE && pattern[1] == RBRACE && pattern[2] == EOS)
240240      return glob0(pattern, pglob);
241241
242   while ((ptr = (const Char *) g_strchr((Char *) ptr, LBRACE)) != NULL)
242   while ((ptr = (const Char *) g_strchr(ptr, LBRACE)) != NULL)
243243      if (!globexp2(ptr, pattern, pglob, &rv))
244244         return rv;
245245
r1469r1470
798798
799799   return osd_opendir(buf);
800800}
801
801#if 0
802802static int
803803g_lstat(fn, sb, pglob)
804804   register Char *fn;
r1469r1470
826826      return((*pglob->gl_stat)(buf, sb));
827827   return(stat(buf, sb));
828828}
829
829#endif
830830static Char *
831831g_strchr(str, ch)
832   Char *str;
832   const Char *str;
833833   int ch;
834834{
835835   do {
836836      if (*str == ch)
837         return (str);
837         return ((Char *)str);
838838   } while (*str++);
839839   return (NULL);
840840}

Previous 15994 Revisions Next


© 1998-2018 The MESS Team