#define _proto_stdc 1 /* Standard-C prototypes ok */
/* */
-/* __STD_C indicates that the language is ANSI-C or C++ */
-#if !defined(__STD_C) && defined(__STDC__)
-#define __STD_C 1
-#endif
-#if !defined(__STD_C) && (defined(__cplusplus) || defined(c_plusplus))
-#define __STD_C 1
-#endif
-#if !defined(__STD_C) && _proto_stdc
-#define __STD_C 1
-#endif
-#if !defined(__STD_C)
-#define __STD_C 0
-#endif
-
/* extern symbols must be protected against C++ name mangling */
#ifndef _BEGIN_EXTERNS_
# if defined(__cplusplus) || defined(c_plusplus)
/* _ARG_ simplifies function prototyping among flavors of C */
#ifndef _ARG_
-#if __STD_C
#define _ARG_(x) x
-#else
-#define _ARG_(x) ()
-#endif
#endif /*_ARG_*/
/* __INLINE__ is the inline keyword */
/* Void_t is defined so that Void_t* can address any type */
#ifndef Void_t
-#if __STD_C
#define Void_t void
-#else
-#define Void_t char
-#endif
#endif /*Void_t */
/* dynamic linked library external scope handling */
}end
cat{
-
- /* __STD_C indicates that the language is ANSI-C or C++ */
- #if !defined(__STD_C) && __STDC__
- #define __STD_C 1
- #endif
- #if !defined(__STD_C) && (__cplusplus || c_plusplus)
- #define __STD_C 1
- #endif
- #if !defined(__STD_C) && _proto_stdc
- #define __STD_C 1
- #endif
- #if !defined(__STD_C)
- #define __STD_C 0
- #endif
/* extern symbols must be protected against C++ name mangling */
#ifndef _BEGIN_EXTERNS_
/* _ARG_ simplifies function prototyping among flavors of C */
#ifndef _ARG_
- #if __STD_C
#define _ARG_(x) x
- #else
- #define _ARG_(x) ()
- #endif
#endif /*_ARG_*/
/* __INLINE__ is the inline keyword */
/* Void_t is defined so that Void_t* can address any type */
#ifndef Void_t
- #if __STD_C
#define Void_t void
- #else
- #define Void_t char
- #endif
#endif /*Void_t*/
/* dynamic linked library external scope handling */
}end
cat{
-
- /* __STD_C indicates that the language is ANSI-C or C++ */
- #if !defined(__STD_C) && __STDC__
- #define __STD_C 1
- #endif
- #if !defined(__STD_C) && (__cplusplus || c_plusplus)
- #define __STD_C 1
- #endif
- #if !defined(__STD_C) && _proto_stdc
- #define __STD_C 1
- #endif
- #if !defined(__STD_C)
- #define __STD_C 0
- #endif
/* extern symbols must be protected against C++ name mangling */
#ifndef _BEGIN_EXTERNS_
/* _ARG_ simplifies function prototyping among flavors of C */
#ifndef _ARG_
- #if __STD_C
#define _ARG_(x) x
- #else
- #define _ARG_(x) ()
- #endif
#endif /*_ARG_*/
/* __INLINE__ is the inline keyword */
/* Void_t is defined so that Void_t* can address any type */
#ifndef Void_t
- #if __STD_C
#define Void_t void
- #else
- #define Void_t char
- #endif
#endif /*Void_t*/
/* dynamic linked library external scope handling */
}end
cat{
-
- /* __STD_C indicates that the language is ANSI-C or C++ */
- #if !defined(__STD_C) && __STDC__
- #define __STD_C 1
- #endif
- #if !defined(__STD_C) && (__cplusplus || c_plusplus)
- #define __STD_C 1
- #endif
- #if !defined(__STD_C) && _proto_stdc
- #define __STD_C 1
- #endif
- #if !defined(__STD_C)
- #define __STD_C 0
- #endif
/* extern symbols must be protected against C++ name mangling */
#ifndef _BEGIN_EXTERNS_
/* _ARG_ simplifies function prototyping among flavors of C */
#ifndef _ARG_
- #if __STD_C
#define _ARG_(x) x
- #else
- #define _ARG_(x) ()
- #endif
#endif /*_ARG_*/
/* __INLINE__ is the inline keyword */
/* Void_t is defined so that Void_t* can address any type */
#ifndef Void_t
- #if __STD_C
#define Void_t void
- #else
- #define Void_t char
- #endif
#endif /*Void_t*/
/* dynamic linked library external scope handling */
#endif
/* to get rid of pesky compiler warnings */
-#if __STD_C
#define NOTUSED(x) (void)(x)
-#else
-#define NOTUSED(x) (&x,1)
-#endif
/* Private flags in the "bits" field */
#define SF_MMAP 00000001 /* in memory mapping mode */
va_list args;
reg int rv;
-#if __STD_C
va_start(args, form);
-#else
- reg Sfio_t *f;
- reg char *form;
- va_start(args);
- f = va_arg(args, Sfio_t *);
- form = va_arg(args, char *);
-#endif
rv = sfvprintf(f, form, args);
va_end(args);
{
va_list args;
reg int rv;
-
-#if __STD_C
va_start(args, form);
-#else
- reg char *s;
- reg int n;
- reg char *form;
- va_start(args);
- s = va_arg(args, char *);
- n = va_arg(args, int);
- form = va_arg(args, char *);
-#endif
-
rv = sfvsprintf(s, n, form, args);
va_end(args);
va_list args;
reg int rv;
static Sfio_t *f;
-
-#if __STD_C
va_start(args, form);
-#else
- reg char *form;
- va_start(args);
- form = va_arg(args, char *);
-#endif
/* make a fake stream */
if (!f &&
{
va_list args;
reg int rv;
-
-#if __STD_C
va_start(args, form);
-#else
- reg Sfio_t *f;
- reg char *form;
- va_start(args);
- f = va_arg(args, Sfio_t *);
- form = va_arg(args, char *);
-#endif
-
rv = (f && form) ? sfvscanf(f, form, args) : -1;
va_end(args);
return rv;
{
va_list args;
reg int rv;
-#if __STD_C
va_start(args, form);
-#else
- reg char *s;
- reg char *form;
- va_start(args);
- s = va_arg(args, char *);
- form = va_arg(args, char *);
-#endif
-
rv = (s && form) ? sfvsscanf(s, form, args) : -1;
va_end(args);
return rv;
}end
cat{
-
- /* __STD_C indicates that the language is ANSI-C or C++ */
- #if !defined(__STD_C) && __STDC__
- #define __STD_C 1
- #endif
- #if !defined(__STD_C) && (__cplusplus || c_plusplus)
- #define __STD_C 1
- #endif
- #if !defined(__STD_C) && _proto_stdc
- #define __STD_C 1
- #endif
- #if !defined(__STD_C)
- #define __STD_C 0
- #endif
/* extern symbols must be protected against C++ name mangling */
#ifndef _BEGIN_EXTERNS_
/* _ARG_ simplifies function prototyping among flavors of C */
#ifndef _ARG_
- #if __STD_C
#define _ARG_(x) x
- #else
- #define _ARG_(x) ()
- #endif
#endif /*_ARG_*/
/* __INLINE__ is the inline keyword */
/* Void_t is defined so that Void_t* can address any type */
#ifndef Void_t
- #if __STD_C
#define Void_t void
- #else
- #define Void_t char
- #endif
#endif /*Void_t*/
/* dynamic linked library external scope handling */
(*(_VM_(vm)->meth.freef))((vm),(Void_t*)(d)) )
#define vmalign(vm,sz,align) (_VMFL_(vm), \
(*(_VM_(vm)->meth.alignf))((vm),(sz),(align)) )
-#if __STD_C || defined(__STDPP__) || defined(__GNUC__)
#define malloc(s) (_VMFL_(Vmregion), malloc((size_t)(s)) )
#define realloc(d,s) (_VMFL_(Vmregion), realloc((Void_t*)(d),(size_t)(s)) )
#define calloc(n,s) (_VMFL_(Vmregion), calloc((size_t)n, (size_t)(s)) )
#define free(d) (_VMFL_(Vmregion), free((Void_t*)(d)) )
#define memalign(a,s) (_VMFL_(Vmregion), memalign((size_t)(a),(size_t)(s)) )
#define valloc(s) (_VMFL_(Vmregion), valloc((size_t)(s) )
-#else
-#define _VMNM_(a,b,c,d,e,f) a/**/b/**/c/**/d/**/e/**/f
-#define malloc(s) (_VMFL_(Vmregion), _VMNM_(mallo,/,*,*,/,c)\
- ((size_t)(s)) )
-#define realloc(d,s) (_VMFL_(Vmregion), _VMNM_(reallo,/,*,*,/,c)\
- ((Void_t*)(d),(size_t)(s)) )
-#define calloc(n,s) (_VMFL_(Vmregion), _VMNM_(callo,/,*,*,/,c)\
- ((size_t)n, (size_t)(s)) )
-#define free(d) (_VMFL_(Vmregion), _VMNM_(fre,/,*,*,/,e)((Void_t*)(d)) )
-#define memalign(a,s) (_VMFL_(Vmregion), _VMNM_(memalig,/,*,*,/,n)\
- ((size_t)(a),(size_t)(s)) )
-#define valloc(s) (_VMFL_(Vmregion), _VMNM_(vallo,/,*,*,/,c)\
- ((size_t)(s) )
-#endif /*__STD_C || defined(__STDPP__) || defined(__GNUC__)*/
#define cfree(d) free(d)
#endif /*defined(VMFL) && defined(__FILE__) && defined(__LINE__) */
/* non-debugging/profiling allocation calls */
#define NIL(t) ((t)0)
#define reg register
-#if __STD_C
#define NOTUSED(x) (void)(x)
-#else
-#define NOTUSED(x) (&x,1)
-#endif
/* convert an address to an integral value */
#define VLONG(addr) ((Vmulong_t)((char*)(addr) - (char*)0) )
#undef _proto_stdc
#define _proto_stdc 1 /* Standard-C prototypes ok */
-/* __STD_C indicates that the language is ANSI-C or C++ */
-#if !defined(__STD_C) && defined(__STDC__)
-#define __STD_C 1
-#endif
-#if !defined(__STD_C) && (defined(__cplusplus) || defined(c_plusplus))
-#define __STD_C 1
-#endif
-#if !defined(__STD_C) && defined(_proto_stdc)
-#define __STD_C 1
-#endif
-#if !defined(__STD_C)
-#define __STD_C 0
-#endif
-
/* extern symbols must be protected against C++ name mangling */
#ifndef _BEGIN_EXTERNS_
#if defined(__cplusplus) || defined(c_plusplus)
/* _ARG_ simplifies function prototyping among flavors of C */
#ifndef _ARG_
-#if __STD_C
#define _ARG_(x) x
-#else
-#define _ARG_(x) ()
-#endif
#endif /*_ARG_*/
/* __INLINE__ is the inline keyword */
/* Void_t is defined so that Void_t* can address any type */
#ifndef Void_t
-#if __STD_C
#define Void_t void
-#else
-#define Void_t char
-#endif
#endif /*Void_t */
/* dynamic linked library external scope handling */