use plan9 malloc

This commit is contained in:
rsc 2004-06-09 14:12:04 +00:00
parent e290cfc138
commit d1b4cfde55
4 changed files with 8 additions and 12 deletions

View file

@ -25,7 +25,9 @@
#define vlong _fmtvlong
#define uvlong _fmtuvlong
#ifndef USED
#define USED(x) if(x);else
#endif
typedef unsigned char uchar;
typedef unsigned short ushort;
@ -37,6 +39,7 @@ typedef unsigned long long uvlong;
typedef long long vlong;
#endif
#undef nil
#define nil 0 /* cannot be ((void*)0) because used for function pointers */
typedef int (*Fmts)(Fmt*);

View file

@ -11,11 +11,8 @@
* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
*/
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include "utf.h"
#include "fmt.h"
#include <u.h>
#include <libc.h>
#include "fmtdef.h"
static int

View file

@ -11,11 +11,8 @@
* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
*/
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include "utf.h"
#include "fmt.h"
#include <u.h>
#include <libc.h>
#include "fmtdef.h"
static int

View file

@ -31,6 +31,5 @@ vsmprint(char *fmt, va_list args)
n = dofmt(&f, fmt);
if(n < 0)
return nil;
*(char*)f.to = '\0';
return (char*)f.start;
return fmtstrflush(&f);
}