summaryrefslogtreecommitdiff
path: root/ulib.c
diff options
context:
space:
mode:
authorrsc <rsc>2006-09-06 17:04:06 +0000
committerrsc <rsc>2006-09-06 17:04:06 +0000
commita650c606fecc7e3938345e2bc52050a9ea725e7a (patch)
tree3bd2cfcd215f7ad4abdb087cdfe91f608c7f0801 /ulib.c
parent45854caa93eecc3f80d34940b7cf6a400b640d69 (diff)
downloadxv6-labs-a650c606fecc7e3938345e2bc52050a9ea725e7a.tar.gz
xv6-labs-a650c606fecc7e3938345e2bc52050a9ea725e7a.tar.bz2
xv6-labs-a650c606fecc7e3938345e2bc52050a9ea725e7a.zip
spacing fixes: no tabs, 2-space indents (for rtm)
Diffstat (limited to 'ulib.c')
-rw-r--r--ulib.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/ulib.c b/ulib.c
index c6c7f19..28f742c 100644
--- a/ulib.c
+++ b/ulib.c
@@ -12,20 +12,20 @@ puts(char *s)
char*
strcpy(char *s, char *t)
{
- char *os;
-
- os = s;
- while((*s++ = *t++) != 0)
- ;
- return os;
+ char *os;
+
+ os = s;
+ while((*s++ = *t++) != 0)
+ ;
+ return os;
}
int
strcmp(const char *p, const char *q)
{
- while (*p && *p == *q)
- p++, q++;
- return (int) ((unsigned char) *p - (unsigned char) *q);
+ while (*p && *p == *q)
+ p++, q++;
+ return (int) ((unsigned char) *p - (unsigned char) *q);
}
unsigned int
@@ -37,7 +37,7 @@ strlen(char *s)
return n;
}
-void *
+void*
memset(void *dst, int c, unsigned int n)
{
char *d = (char *) dst;
@@ -48,16 +48,16 @@ memset(void *dst, int c, unsigned int n)
return dst;
}
-char *
+char*
strchr(const char *s, char c)
{
- for (; *s; s++)
- if (*s == c)
- return (char *) s;
- return 0;
+ for (; *s; s++)
+ if (*s == c)
+ return (char *) s;
+ return 0;
}
-char *
+char*
gets(char *buf, int max)
{
int i = 0, cc;