Deleted Added
full compact
1/*
2 * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
3 * All rights reserved.
4 * Copyright (c) 1990
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Chris Torek.
9 *
10 * By using this file, you agree to the terms and conditions set
11 * forth in the LICENSE file which can be found at the top level of
12 * the sendmail distribution.
13 */
14
15#include <sm/gen.h>
16SM_IDSTR(id, "@(#)$Id: vfprintf.c,v 1.52 2001/09/11 04:04:49 gshapiro Exp $")
17
18/*
19** Overall:
20** Actual printing innards.
21** This code is large and complicated...
22*/
23
24#include <sys/types.h>
25#include <stdlib.h>
26#include <string.h>
27#include <errno.h>
28#include <sm/config.h>
29#include <sm/varargs.h>
30#include <sm/io.h>
31#include <sm/heap.h>
32#include <sm/conf.h>
33#include "local.h"
34#include "fvwrite.h"
35
36static void sm_find_arguments __P((const char *, va_list , va_list **));
37static void sm_grow_type_table_x __P((unsigned char **, int *));
38static int sm_print __P((SM_FILE_T *, int, struct sm_uio *));
39
40/*
41** SM_PRINT -- print/flush to the file
42**
43** Flush out all the vectors defined by the given uio,

--- 46 unchanged lines hidden (view full) ---

90** Success: number of data units used in the formating
91**
92** Side effects:
93** formatted o/p can be SM_IO_BUFSIZ length maximum
94*/
95
96static int
97sm_bprintf(fp, fmt, ap)
98 register SM_FILE_T *fp;
99 const char *fmt;
100 SM_VA_LOCAL_DECL
101{
102 int ret;
103 SM_FILE_T fake;
104 unsigned char buf[SM_IO_BUFSIZ];
105 extern const char SmFileMagic[];
106

--- 1001 unchanged lines hidden ---