[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] varargs for printf and printf_P
From: |
Joerg Wunsch |
Subject: |
Re: [avr-libc-dev] varargs for printf and printf_P |
Date: |
Tue, 29 Oct 2002 10:37:53 +0100 |
User-agent: |
Mutt/1.2.5i |
As Harald Kipp wrote:
> I'd like to have a special printf_P function,
> where the format string is a ROM constant.
> To avoid duplicating the code of printf, I
> was looking for a possibility to write vprintf,
> but couldn't find any vararg implementation.
Please have a look at the current state of CVS, it's all already there
(except floating point formatting, which i'm still implementing).
Ted is working on updating the Web pages with the current
documentation, until then, sorry, it's only in CVS by now.
Here's the part of the avr_stdio(3) man page that explains what is
currently already implemented:
Defines
#define FILE struct __file
#define stdin (__iob[0])
#define stdout (__iob[1])
#define stderr (__iob[2])
#define EOF (-1)
#define putc(__c, __stream) fputc(__c, __stream)
#define putchar(__c) fputc(__c, stdout)
Functions
FILE * fdevopen (int(*__put)(char), int(*__get)(void), int
__opts)
int fclose (FILE *__stream)
int vfprintf (FILE *__stream, const char *__fmt, va_list
__ap)
int fputc (int __c, FILE *__stream)
int printf (const char *__fmt,...)
int printf_P (const char *__fmt,...)
int sprintf (char *__s, const char *__fmt,...)
int sprintf_P (char *__s, const char *__fmt,...)
int snprintf (char *__s, size_t __n, const char
*__fmt,...)
int snprintf_P (char *__s, size_t __n, const char
*__fmt,...)
int fprintf (FILE *__stream, const char *__fmt,...)
int fprintf_P (FILE *__stream, const char *__fmt,...)
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j/