]> Joshua Wise's Git repositories - netwatch.git/commitdiff
merge
authorJoshua Wise <joshua@rebirth.joshuawise.com>
Fri, 19 Sep 2008 20:56:30 +0000 (16:56 -0400)
committerJoshua Wise <joshua@rebirth.joshuawise.com>
Fri, 19 Sep 2008 20:56:30 +0000 (16:56 -0400)
1  2 
include/minilib.h
lib/minilib.c

diff --combined include/minilib.h
index 0f5edff26ca37725b4f72321860cb03e159882ac,b583046bd9d74d263ceb39ebcb1f451b91d7fd55..aa8bf7364d16220e854c019518178fd0479060b0
@@@ -1,20 -1,13 +1,20 @@@
  #ifndef MINILIB_H
  #define MINILIB_H
  
 -void memcpy(void *dest, void *src, int bytes);
 -void memmove(void *dest, void *src, int bytes);
 -int strcmp(const char *a2, const char *a1);
 -void strcpy(char *a2, const char *a1);
 -void tohex(char *s, unsigned long l);
 +#include <stdarg.h>
  
 -void puts(const char *c);
 -void puthex(unsigned long l);
 +extern void memcpy(void *dest, void *src, int bytes);
 +extern void memmove(void *dest, void *src, int bytes);
 +extern int memcmp(const char *a2, const char *a1, int bytes);
 +extern int strcmp(const char *a2, const char *a1);
- extern int strlen(char *c);
++extern int strlen(const char *c);
 +extern void strcpy(char *a2, const char *a1);
- extern void puts(char *c);
++extern void puts(const char *c);
 +extern void tohex(char *s, unsigned long l);
 +extern void puthex(unsigned long l);
 +extern int vsprintf(char *s, const char *fmt, va_list args);
 +extern int vsnprintf(char *s, int size, const char *fmt, va_list args);
 +extern int sprintf(char *s, const char *fmt, ...);
 +extern int snprintf(char *s, int size, const char *fmt, ...);
  
  #endif
diff --combined lib/minilib.c
index 595341e192a18fa981bbeebe03eef3abd1954700,1ef4731713be39edfad63cce2c92aed9e9ecf3a7..7baca595ed4c62fa3ff0d09d1c8bbcaf1c0815d6
@@@ -43,7 -43,7 +43,7 @@@ int strcmp (const char *a2, const char 
        }
  }
  
- int strlen(char *c)
+ int strlen(const char *c)
  {
        int l = 0;
        while (*(c++))
@@@ -58,7 -58,7 +58,7 @@@ void strcpy(char *a2, const char *a1
        } while (*(a1++));
  }
  
- void puts(char *c)
+ void puts(const char *c)
  {
        putbytes(c, strlen(c));
  }
@@@ -81,3 -81,5 +81,3 @@@ void puthex(unsigned long l
        tohex(d, l);
        puts(d);
  }
 -
 -
This page took 0.026767 seconds and 4 git commands to generate.