Changeset 230 for Whitix/trunk/lib

Show
Ignore:
Timestamp:
04/10/08 18:14:33 (8 months ago)
Author:
mwhitworth
Message:

Rework mmap and shared memory. Add correct return code to SysSharedMemoryAttach, document various things.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Whitix/trunk/lib/string.c

    r66 r230  
    128128} 
    129129 
     130int memcmp(const void *s1, const void *s2, int n) 
     131{ 
     132        unsigned char* c1, *c2; 
     133        int res=0; 
     134 
     135        for (c1=(unsigned char*)s1, c2=(unsigned char*)s2; n; ++c1, ++c2, n--) 
     136        { 
     137                if ((res=*c1-*c2)) 
     138                        break; 
     139        } 
     140 
     141        return res; 
     142} 
     143 
    130144int toupper(char ch) 
    131145{