Changeset 2922


Ignore:
Timestamp:
Mar 27, 2012, 8:00:03 PM (3 years ago)
Author:
wmb
Message:

Client library - fixed residual problem from recent cleanup.

Location:
clients/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • clients/lib/1275.h

    r2919 r2922  
    4343
    4444extern int   decode_int(UCHAR *);
    45 extern void  exit(int);
    4645extern void  fatal(char *fmt, ...);
    47 extern void  free(void *);
    4846extern cell_t get_cell_prop(phandle, char *);
    4947extern cell_t get_cell_prop_def(phandle, char *, cell_t);
     
    5149extern int   get_int_prop_def(phandle, char *, int);
    5250extern char *get_str_prop(phandle, const char *, allocflag);
    53 extern void *malloc(size_t);
    54 extern void  memcpy(void *, void *, size_t);
    55 extern void  memset(void *, int, size_t);
    56 extern int   memcmp(const void *, const void *, size_t);
    5751extern int   printf(char *fmt, ...);
    58 extern void  putchar(UCHAR);
    59 extern void *realloc(void *, size_t);
     52extern int   putchar(int);
    6053extern void  warn(char *fmt, ...);
    6154extern void *zalloc(size_t);
  • clients/lib/lib.c

    r2919 r2922  
    130130
    131131int
    132 fputc(char c, FILE *fp)
     132fputc(int c, FILE *fp)
    133133{
    134134  if (fp->readonly)
    135135    return -1;  // EOF
    136136
    137   if (fp == stdout && c == '\n')
     137  if (fp == stdout && (unsigned char)c == '\n')
    138138    (void) fputc('\r', fp);
    139139
    140   fp->buf[fp->bufc++] = c;
     140  fp->buf[fp->bufc++] = (unsigned char)c;
    141141  fp->dirty = 1;
    142142
    143   if ((fp->bufc == 127) || (fp == stdout && c == '\n')) {
     143  if ((fp->bufc == 127) || (fp == stdout && (unsigned char)c == '\n')) {
    144144    OFWrite(fp->id, fp->buf, fp->bufc);
    145145    fp->bufc = 0;
    146146    fp->dirty = 0;
    147147  }
    148   return (int)c;
     148  return (int)(unsigned char)c;
    149149}
    150150
     
    217217}
    218218
    219 void
    220 putchar(UCHAR c)
     219int
     220putchar(int c)
    221221{
    222222  fputc(c, stdout);
  • clients/lib/string.h

    r2919 r2922  
    1515char *strstr(const char *haystack, const char *needle);
    1616char *strcasestr(const char *haystack, const char *needle);
    17 const void *memchr(const void *s, int c, size_t len);
     17void *memchr(const void *s, int c, size_t len);
     18void *memcpy(void *dest, const void *src, size_t n);
     19int memcmp(const void *s1, const void *s2, size_t n);
     20void *memset(void *s, int c, size_t n);
    1821int toupper(int c);
  • clients/lib/strings.c

    r2919 r2922  
    189189}
    190190
    191 const void *memchr(const void *s, int c, size_t len)
     191void *memchr(const void *s, int c, size_t len)
    192192{
    193193        const unsigned char *p = s;
Note: See TracChangeset for help on using the changeset viewer.