Changeset 600f5d1 in mainline for uspace/app/bithenge/helenos/os.h


Ignore:
Timestamp:
2012-06-27T20:10:30Z (12 years ago)
Author:
Sean Bartell <wingedtachikoma@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
02dcb20
Parents:
978ccaf1
Message:

Bithenge: add composition, ascii, and zero_terminated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bithenge/helenos/os.h

    r978ccaf1 r600f5d1  
    3535#include <macros.h>
    3636#include <mem.h>
     37#include <stdlib.h>
    3738#include <str.h>
    3839#include <str_error.h>
     
    6768}
    6869
     70static inline void *memchr(const void *s, int c, size_t n)
     71{
     72        for (size_t i = 0; i < n; i++)
     73                if (((char *)s)[i] == c)
     74                        return (void *)(s + i);
     75        return NULL;
     76}
     77
    6978#endif
Note: See TracChangeset for help on using the changeset viewer.