no need to keep several versions of it.
return isupper(__c) ? _tolower(__c) : __c;
}
+__ctype_inline char *skipspace(const char *p)
+{
+ while (isspace((unsigned char)*p))
+ p++;
+ return (char *)p;
+}
+
#endif /* _CTYPE_H */
#include <sys/pci.h>
#include <com32.h>
#include <stdbool.h>
+#include <ctype.h>
#include <syslinux/zio.h>
#ifdef DEBUG
#define MAX_LINE 512
-/* searching the next char that is not a space */
-static char *skipspace(char *p)
-{
- while (*p && *p <= ' ')
- p++;
-
- return p;
-}
-
/* removing any \n found in a string */
static void remove_eol(char *string)
{
bail_err /* Conversion mismatch */
};
-static const char *skipspace(const char *p)
-{
- while (isspace((unsigned char)*p))
- p++;
- return p;
-}
-
int vsscanf(const char *buffer, const char *format, va_list ap)
{
const char *p = format;
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
+#include <ctype.h>
#define lpcilib_c /* Define the library */
#include "lualib.h"
#include <sys/pci.h>
+/* removing any \n found in a string */
+static void remove_eol(char *string)
+{
+ int j = strlen(string);
+ int i = 0;
+ for (i = 0; i < j; i++)
+ if (string[i] == '\n')
+ string[i] = 0;
+}
static int pci_getinfo(lua_State *L)
{
return 1;
}
-/* searching the next char that is not a space */
-static char *skipspace(char *p)
-{
- while (*p && *p <= ' ')
- p++;
-
- return p;
-}
-
-/* removing any \n found in a string */
-static void remove_eol(char *string)
-{
- int j = strlen(string);
- int i = 0;
- for(i = 0; i < j; i++) if(string[i] == '\n') string[i] = 0;
-}
-
-
/* Try to match any pci device to the appropriate kernel module */
/* it uses the modules.pcimap from the boot device*/
static int pci_getidlist(lua_State *L)
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
+#include <ctype.h>
#include <minmax.h>
#include <alloca.h>
#include <inttypes.h>
#define MAX_LINE 4096
-static char *skipspace(char *p)
-{
- while (*p && my_isspace(*p))
- p++;
-
- return p;
-}
-
/* Strip ^ from a string, returning a new reference to the same refstring
if none present */
static const char *strip_caret(const char *str)
#include <inttypes.h>
#include <stdio.h>
+#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <console.h>
# define dprintf(...) ((void)0)
#endif
-static char *skipspace(char *p)
-{
- while (*p && *p <= ' ')
- p++;
-
- return p;
-}
-
#define MAX_LINE 512
/* Check to see if we are at a certain keyword (case insensitive) */