Remove ucore_ prefix from headers and source files

This commit is contained in:
Nils O. Selåsdal
2013-03-06 22:22:04 +01:00
parent ee8d9ae19d
commit 8badeaf857
85 changed files with 168 additions and 168 deletions
+38
View File
@@ -0,0 +1,38 @@
#include <string.h>
#include "ucore/string.h"
int
getfields(char *str, char **args, int max, int mflag, const char *set)
{
char r;
int intok, narg;
if (max <= 0)
return 0;
narg = 0;
args[narg] = str;
if (!mflag)
narg++;
intok = 0;
for (;; str++) {
r = *str;
if (r == 0)
break;
if (strchr(set, r)) {
if (narg >= max)
break;
*str = 0;
intok = 0;
args[narg] = str + 1;
if (!mflag)
narg++;
} else {
if (!intok && mflag)
narg++;
intok = 1;
}
}
return narg;
}