2004-02-29 22:11:15 +00:00
|
|
|
/*
|
|
|
|
* The authors of this software are Rob Pike and Ken Thompson.
|
|
|
|
* Copyright (c) 2002 by Lucent Technologies.
|
|
|
|
* Permission to use, copy, modify, and distribute this software for any
|
|
|
|
* purpose without fee is hereby granted, provided that this entire notice
|
|
|
|
* is included in all copies of any software which is or includes a copy
|
|
|
|
* or modification of this software and in all copies of the supporting
|
|
|
|
* documentation for such software.
|
|
|
|
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
|
2004-12-29 01:27:57 +00:00
|
|
|
* WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE
|
|
|
|
* ANY REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
|
2004-02-29 22:11:15 +00:00
|
|
|
* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
|
|
|
|
*/
|
2004-12-26 21:50:14 +00:00
|
|
|
#include <stdlib.h>
|
2004-12-26 23:07:37 +00:00
|
|
|
#include <stdarg.h>
|
2004-12-26 21:50:14 +00:00
|
|
|
#include "plan9.h"
|
|
|
|
#include "fmt.h"
|
2004-02-29 22:11:15 +00:00
|
|
|
#include "fmtdef.h"
|
|
|
|
|
|
|
|
char*
|
|
|
|
fmtstrflush(Fmt *f)
|
|
|
|
{
|
2004-12-26 23:07:37 +00:00
|
|
|
if(f->start == nil)
|
|
|
|
return nil;
|
2004-02-29 22:11:15 +00:00
|
|
|
*(char*)f->to = '\0';
|
|
|
|
return (char*)f->start;
|
|
|
|
}
|