Annotation of Gnu-Mach/kern/printf.h, revision 1.1.1.3

1.1       root        1: /*
                      2:  * Header file for printf type functions.
                      3:  * Copyright (C) 2006, 2007 Free Software Foundation.
                      4:  *
                      5:  * This program is free software; you can redistribute it and/or modify
                      6:  * it under the terms of the GNU General Public License as published by
                      7:  * the Free Software Foundation; either version 2, or (at your option)
                      8:  * any later version.
                      9:  *
                     10:  * This program is distributed in the hope that it will be useful,
                     11:  * but WITHOUT ANY WARRANTY; without even the implied warranty of
                     12:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     13:  * GNU General Public License for more details.
                     14:  *
                     15:  * You should have received a copy of the GNU General Public License
                     16:  * along with this program; if not, write to the Free Software
                     17:  * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
                     18:  */
                     19: /*
                     20:  *     String handling functions.
                     21:  *
                     22:  */
                     23: 
                     24: #ifndef _MACH_SA_SYS_PRINTF_H_
                     25: #define _MACH_SA_SYS_PRINTF_H_
                     26: 
                     27: #include <sys/types.h>
                     28: #include <stdarg.h>
                     29: 
                     30: extern void _doprnt (const char *fmt,
                     31:                     va_list argp, 
                     32:                     void (*putc)(char, vm_offset_t), 
                     33:                     int radix, 
                     34:                     vm_offset_t putc_arg);
                     35: 
1.1.1.3 ! root       36: extern void printnum (unsigned long long u, int base,
1.1       root       37:                       void (*putc)(char, vm_offset_t),
                     38:                       vm_offset_t putc_arg);
                     39: 
1.1.1.3 ! root       40: extern int sprintf (char *buf, const char *fmt, ...)
        !            41:        __attribute__ ((format (printf, 2, 3)));
        !            42: extern int snprintf (char *buf, size_t size, const char *fmt, ...)
        !            43:        __attribute__ ((format (printf, 3, 4)));
        !            44: extern int vsnprintf (char *buf, size_t size, const char *fmt, va_list args)
        !            45:        __attribute__ ((format (printf, 3, 0)));
        !            46: 
1.1       root       47: 
1.1.1.3 ! root       48: extern int printf (const char *fmt, ...)
        !            49:        __attribute__ ((format (printf, 1, 2)));
1.1       root       50: 
                     51: #define printf_once(fmt, ...)                  \
                     52:        MACRO_BEGIN                             \
                     53:        static int __once = 0;                  \
                     54:        if (!__once) {                          \
                     55:                printf(fmt, ##__VA_ARGS__);     \
                     56:                __once = 1;                     \
                     57:        }                                       \
                     58:        MACRO_END
                     59: 
                     60: extern int indent;
                     61: extern void iprintf (const char *fmt, ...);
                     62: 
                     63: extern int vprintf(const char *fmt, va_list listp);
                     64: 
                     65: extern void safe_gets (char *str, int maxlen);
                     66: 
                     67: #endif /* _MACH_SA_SYS_PRINTF_H_ */
                     68: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.