elk (3.0-13) unstable; urgency=low
* Fixed gcc-3.3 compilation errors due to deprecated usage of <varargs.h>. -- Sam Hocevar (Debian packages) <sam+deb@zoy.org> Fri, 30 May 2003 17:04:56 +0200 git-svn-id: svn://svn.zoy.org/elk/trunk@7 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
+8
-11
@@ -1,5 +1,5 @@
|
||||
#include <ctype.h>
|
||||
#include <varargs.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "kernel.h"
|
||||
@@ -42,15 +42,13 @@ void Set_App_Name (char *name) {
|
||||
|
||||
#ifdef lint
|
||||
/*VARARGS1*/
|
||||
void Fatal_Error (char *foo) { foo = foo; }
|
||||
void Fatal_Error (const char *foo) { foo = foo; }
|
||||
#else
|
||||
void Fatal_Error (va_alist) va_dcl {
|
||||
void Fatal_Error (const char *fmt, ...) {
|
||||
va_list args;
|
||||
char *fmt;
|
||||
|
||||
Disable_Interrupts;
|
||||
va_start (args);
|
||||
fmt = va_arg (args, char *);
|
||||
va_start (args, fmt);
|
||||
(void)fflush (stdout);
|
||||
if (appname)
|
||||
fprintf (stderr, "\n%s: fatal error: ", appname);
|
||||
@@ -91,17 +89,16 @@ void Uncatchable_Error (char *errmsg) {
|
||||
|
||||
#ifdef lint
|
||||
/*VARARGS1*/
|
||||
void Primitive_Error (char *foo) { foo = foo; }
|
||||
void Primitive_Error (const char *foo) { foo = foo; }
|
||||
#else
|
||||
void Primitive_Error (va_alist) va_dcl {
|
||||
void Primitive_Error (const char *fmt, ...) {
|
||||
va_list args;
|
||||
register char *p, *fmt;
|
||||
register const char *p;
|
||||
register int i, n;
|
||||
Object msg, sym, argv[10];
|
||||
GC_Node; GCNODE gcv;
|
||||
|
||||
va_start (args);
|
||||
fmt = va_arg (args, char *);
|
||||
va_start (args, fmt);
|
||||
for (n = 0, p = fmt; *p; p++)
|
||||
if (*p == '~' && p[1] != '~' && p[1] != '%'
|
||||
&& p[1] != 'E' && p[1] != 'e')
|
||||
|
||||
+3
-7
@@ -6,7 +6,7 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
#include <varargs.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef FLUSH_TIOCFLUSH
|
||||
# include <sys/ioctl.h>
|
||||
@@ -107,15 +107,11 @@ void vsprintf (register char *s, register char *fmt, va_list ap) {
|
||||
#endif
|
||||
|
||||
/*VARARGS0*/
|
||||
void Printf (va_alist) va_dcl {
|
||||
void Printf (Object port, const char *fmt, ...) {
|
||||
va_list args;
|
||||
Object port;
|
||||
char *fmt;
|
||||
char buf[1024];
|
||||
|
||||
va_start (args);
|
||||
port = va_arg (args, Object);
|
||||
fmt = va_arg (args, char *);
|
||||
va_start (args, fmt);
|
||||
if (PORT(port)->flags & P_STRING) {
|
||||
vsprintf (buf, fmt, args);
|
||||
Print_String (port, buf, strlen (buf));
|
||||
|
||||
+3
-9
@@ -1,7 +1,7 @@
|
||||
/* Termination functions, weak pointers.
|
||||
*/
|
||||
|
||||
#include <varargs.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "kernel.h"
|
||||
@@ -51,17 +51,11 @@ void Deregister_Object (Object obj) {
|
||||
* Null is returned when the object has not been found.
|
||||
*/
|
||||
/*VARARGS*/
|
||||
Object Find_Object (va_alist) va_dcl {
|
||||
Object Find_Object (int type, GENERIC group, MATCHFUN match, ...) {
|
||||
WEAK_NODE *p;
|
||||
int type;
|
||||
GENERIC group;
|
||||
MATCHFUN match;
|
||||
va_list args;
|
||||
|
||||
va_start (args);
|
||||
type = va_arg (args, int);
|
||||
group = va_arg (args, GENERIC);
|
||||
match = va_arg (args, MATCHFUN);
|
||||
va_start (args, match);
|
||||
for (p = first; p; p = p->next) {
|
||||
if (TYPE(p->obj) != type || p->group != group)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user