morpheus-base

morpheus base system
git clone git://git.2f30.org/morpheus-base.git
Log | Files | Refs

util.h (1084B)


      1 /* See LICENSE file for copyright and license details. */
      2 #include "arg.h"
      3 
      4 #define UTF8_POINT(c) (((c) & 0xc0) != 0x80)
      5 #define LEN(x) (sizeof (x) / sizeof *(x))
      6 
      7 /* eprintf.c */
      8 extern char *argv0;
      9 
     10 /* agetcwd.c */
     11 char *agetcwd(void);
     12 
     13 /* apathmax.c */
     14 void apathmax(char **, long *);
     15 
     16 /* ealloc.c */
     17 void *ecalloc(size_t, size_t);
     18 void *emalloc(size_t size);
     19 void *erealloc(void *, size_t);
     20 char *estrdup(const char *);
     21 
     22 /* eprintf.c */
     23 void enprintf(int, const char *, ...);
     24 void eprintf(const char *, ...);
     25 void weprintf(const char *, ...);
     26 
     27 /* estrtol.c */
     28 long estrtol(const char *, int);
     29 
     30 /* estrtoul.c */
     31 unsigned long estrtoul(const char *, int);
     32 
     33 /* explicit_bzero.c */
     34 #undef explicit_bzero
     35 void explicit_bzero(void *, size_t);
     36 
     37 /* putword.c */
     38 void putword(const char *);
     39 
     40 /* recurse.c */
     41 void recurse(const char *, void (*)(const char *));
     42 
     43 /* strlcpy.c */
     44 #undef strlcat
     45 size_t strlcat(char *, const char *, size_t);
     46 
     47 /* strlcat.c */
     48 #undef strlcpy
     49 size_t strlcpy(char *, const char *, size_t);
     50 
     51 /* tty.c */
     52 void devtotty(int, int *, int *);
     53 char *ttytostr(int, int);