9base

revived minimalist port of Plan 9 userland to Unix
git clone git://git.suckless.org/9base
Log | Files | Refs | README | LICENSE

errfmt.c (262B)


      1 /* Copyright (c) 2002-2006 Lucent Technologies; see LICENSE */
      2 #include <stdarg.h>
      3 #include <errno.h>
      4 #include <string.h>
      5 #include "plan9.h"
      6 #include "fmt.h"
      7 #include "fmtdef.h"
      8 
      9 int
     10 __errfmt(Fmt *f)
     11 {
     12 	char *s;
     13 
     14 	s = strerror(errno);
     15 	return fmtstrcpy(f, s);
     16 }