-void* bsearch (void* key, void* base, size_t n, size_t size, int (*cmp) (void*, void*))
+void* bsearch (const void* key, const void* base, size_t n, size_t size,
+ int (*cmp) (const void*, const void*))
{
- int current;
+ int current;
int result;
int found = 0;
int first = 0;
-int cprintf (char* format, ...)
+int cprintf (const char* format, ...)
{
va_list ap;
va_start (ap, format);
-FILE* fdopen (int handle, char* /*mode*/)
+FILE* fdopen (int handle, const char* /*mode*/)
{
FILE* f;
-int fprintf (FILE* /*F*/, char* format, ...)
+int fprintf (FILE* /*F*/, const char* format, ...)
{
va_list ap;
va_start (ap, format);
-int fputs (char* s, FILE* f)
+int fputs (const char* s, FILE* f)
{
/* Check if the file is open or if there is an error condition */
if ((f->f_flags & _FOPEN) == 0 || (f->f_flags & (_FERROR | _FEOF)) != 0) {
-FILE* freopen (char* name, char* mode, FILE* f)
+FILE* freopen (const char* name, const char* mode, FILE* f)
{
/* Check if the file is open, if so, close it */
if ((f->f_flags & _FOPEN) == 0) {
-size_t fwrite (void* buf, size_t size, size_t count, FILE* f)
+size_t fwrite (const void* buf, size_t size, size_t count, FILE* f)
{
int bytes;
/*
* printf.c
- *
+ *
* Ullrich von Bassewitz, 11.08.1998
*/
-int printf (char* format, ...)
+int printf (const char* format, ...)
{
va_list ap;
va_start (ap, format);
-int sprintf (char* /*buf*/, char* format, ...)
+int sprintf (char* /*buf*/, const char* format, ...)
{
va_list ap;
va_start (ap, format);
-int vcprintf (char* format, va_list ap)
+int vcprintf (const char* format, va_list ap)
{
struct outdesc d;
-int vfprintf (FILE* f, char* format, va_list ap)
+int vfprintf (FILE* f, const char* format, va_list ap)
{
struct outdesc d;
+
-int vprintf (char* format, va_list ap)
+int vprintf (const char* format, va_list ap)
{
return vfprintf (stdout, format, ap);
}
-int vsprintf (char* buf, char* format, va_list ap)
+int vsprintf (char* buf, const char* format, va_list ap)
{
struct outdesc d;