Revision: 1570
http://freedos.svn.sourceforge.net/freedos/?rev=1570&view=rev
Author: bartoldeman
Date: 2011-04-22 14:36:09 +0000 (Fri, 22 Apr 2011)
Log Message:
-----------
Remove duplicate .h files from suppl source.
Removed Paths:
-------------
freecom/trunk/suppl/src/appname.h
freecom/trunk/suppl/src/cntry.h
freecom/trunk/suppl/src/dfn.h
freecom/trunk/suppl/src/dynstr.h
freecom/trunk/suppl/src/environ.h
freecom/trunk/suppl/src/errcodes.h
freecom/trunk/suppl/src/external.h
freecom/trunk/suppl/src/fmemory.h
freecom/trunk/suppl/src/getopt.h
freecom/trunk/suppl/src/mcb.h
freecom/trunk/suppl/src/msgs.h
freecom/trunk/suppl/src/nls.h
freecom/trunk/suppl/src/nls_c.h
freecom/trunk/suppl/src/nls_f.h
freecom/trunk/suppl/src/psp.h
freecom/trunk/suppl/src/sstr.h
freecom/trunk/suppl/src/str.h
freecom/trunk/suppl/src/supl_def.h
freecom/trunk/suppl/src/suppl.h
freecom/trunk/suppl/src/suppldbg.h
freecom/trunk/suppl/src/supplio.h
freecom/trunk/suppl/src/syslog.h
Deleted: freecom/trunk/suppl/src/appname.h
===================================================================
--- freecom/trunk/suppl/src/appname.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/appname.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,48 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* $Id$
- $Locker$ $Name$ $State$
-
- Declarations for the application name/path etc. functions.
- For details refer to DOC\DETAILS.TEX
-
-*/
-
-#ifndef __APPNAME_H
-#define __APPNAME_H
-
-#ifndef __PORTABLE_H
-#include <portable.h>
-#endif
-#ifndef __DFN_H
-#include "dfn.h"
-#endif
-
-char *appName(void);
-char *appPath(void);
-char *appFile(void);
-char *appNameEx(void);
-char *appPathEx(void);
-char *appFileEx(void);
-int appInit(const char * const fnam);
-int appInitEx(const char * const fnam);
-int appInitEnv(void);
-int appInitEnvEx(void);
-
-#endif
Deleted: freecom/trunk/suppl/src/cntry.h
===================================================================
--- freecom/trunk/suppl/src/cntry.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/cntry.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,103 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* $Id$
- $Locker$ $Name$ $State$
-
- DOS NLS implementation -- "Country" information DOS-65-XX
- See DOC\CNTRY.H
-
- These functions provide an easy access to the information
- stored in the DOS NLS, but does not actually offer any
- functions to transform/compare etc.
-
-*/
-
-#ifndef __CNTRY_H
-#define __CNTRY_H
-
-#ifndef __PORTABLE_H
-#include <portable.h>
-#endif
-#include "suppl.h"
-
-/* All information from Ralf Brown's interrupt list v5.6 */
-struct Country_ { /* local copy of country information */
- /* pointers to tables */
- fartbl uppercaseTbl; /* uppercase for "normal" characters */
- fartbl lowercaseTbl; /* lowercase for "normal" chars (maybe NULL) */
- fartbl fupcaseTbl; /* uppercase for filename characters */
- fartbl collateTbl; /* collating table */
-
- fartbl illegalChars; /* illegal characters in filenames */
- int illegalLen; /* illegal characters in filenames */
-
- /* length of the tables
- If length <= 0x80 the table does not contain values for
- the indexs 0..0x7F, but the pointers are adjusted that index 0x80
- really points to the first entry of the table. */
- int uppercaseLen; /* uppercase for "normal" characters */
- int lowercaseLen; /* lowercase for "normal" chars (maybe NULL) */
- int fupcaseLen; /* uppercase for filename characters */
- int collateLen; /* collating table */
-
- /* Extended country information */
- word country; /* currently active DOS country code */
- word charset; /* currently active DOS codepage */
- word datefmt; /* format of date: 0/1/2 == USA/Europe/Japan */
- byte curSymbol[6]; /* ASCIZ currency symbol */
- byte thousendsSep[3]; /* ASCIZ decimal separator */
- byte decimalSep[3]; /* ASCIZ decimal separator */
- byte dateSep[3]; /* ASCIZ date separator */
- byte timeSep[3]; /* ASCIZ time separator */
- byte listSep[3]; /* ASCIZ list separator */
- byte curFormat; /* bit 0: 0/1 == preceed/follow value
- bit 1: separate cur sym from value by one space
- bit 2: cur sym replaces decimal point */
- byte precision; /* number of digits after decimal point */
- byte timefmt; /* bit 0: 0/1 == 12/24 hour clock */
-
- /* valid filename characters */
- byte inclFirst, inclLast; /* permissible character range */
- byte exclFirst, exclLast; /* excluded character range */
-
- byte initialized;
-};
-
-#ifdef _MICROC_
-#define Country struct Country_
-#else /*# !(defined(_MICROC_)) */
-typedef struct Country_ Country;
-#endif /*# defined(_MICROC_) */
-
-Country *nlsInfo(void);
-/*
- * Return a pointer to a filled copy of above structure
- *
- * During the life-time of a program the information is retrieved once.
- *
- * Return: Always != NULL, but maybe ome fields are NULL.
- */
-
-Country *nlsNewInfo(void);
-/*
- * As nlsInfo(), but causes to reread the information cached by
- * nlsInfo().
- */
-
-#endif /*# !defined(__CNTRY_H) */
Deleted: freecom/trunk/suppl/src/dfn.h
===================================================================
--- freecom/trunk/suppl/src/dfn.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/dfn.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,127 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* $Id$
- $Locker$ $Name$ $State$
-
- Declarations for the DOS filename functions.
-
-*/
-
-#ifndef __DFN_H
-#define __DFN_H
-
-#include <supl_def.h>
-#ifndef __PORTABLE_H
-#include <portable.h>
-#endif
-#include <nls_f.h>
-#ifdef _TC_LATER_
-#include <direct.h>
-#endif
-#ifdef __TURBOC__
-#include <stddef.h>
-#endif
-
-/* To support UNC paths, all functions are macro'ed from
- dfn*() ---> dfnu*()
-*/
-#ifdef SUPPORT_UNC_PATH
-#define dfnmerge dfnumerge
-#define dfnsplit dfnusplit
-#define dfnexpand dfnuexpand
-#define dfnsqueeze dfnusqueeze
-#define dfnmatch dfnumatch
-#define dfnfullpath dfnufullpath
-#define dfnfullpath2 dfnufullpath2
-#endif
-
-#define DFN_FILE 0x4000
-#define DFN_LFN 0x2000
-#define DFN_SHARABLE 0x0080
-#define DFN_PENDING_DELETE 0x0080
-#define DFN_ARCHIVE 0x0020
-#define DFN_DIRECTORY 0x0010
-#define DFN_LABEL 0x0008
-#define DFN_VOLUME 0x0008
-#define DFN_SYSTEM 0x0004
-#define DFN_HIDDEN 0x0002
-#define DFN_WRITE 0x0001
-#define DFN_WRITABLE DFN_WRITE
-/* Derived attributes */
-#define DFN_READ DFN_FILE /* every file can be read */
-#define DFN_READABLE DFN_READ
-
-struct DFN_GLOB_t {
- char *dfn_basedir;
- struct {
- unsigned dfn_rewind:1;
- unsigned dfn_eof:1;
- } dfn_flags;
- unsigned dfn_searchattr;
- size_t dfn_basedirlen;
- size_t dfn_basediroffset;
- void *dfn_data;
- char dfn_pattern[1];
-};
-#ifndef _MICROC_
-typedef struct DFN_GLOB_t DFN_GLOB;
-#else
-#define DFN_GLOB struct DFN_GLOB_t
-#endif
-
-char *dfnexpand(const char * const fname, char * const path);
-char *dfnfullpath(const char * const fname);
-char *dfnfullpath2(const char * const fname);
-char *dfnmerge(char *fname, const char * const dr, const char * const path
- , const char * const name, const char * const ext);
-int dfnsplit(const char * const fname, char ** const dr, char ** const path, char ** const name, char ** const ext);
-char *dfnsqueeze(const char * const fname);
-char *dfnpath(int drive);
-char *dfntruename(const char * const fn);
-char *dfnsearch(const char * const fname, const char * const path, const char * const ext);
-int dfnmatchcomponent(const char *fnam, const char *pattern);
-int dfnmatchcomponent2(const char *fnam, const char *pattern);
-int dfnmatchext(const char *fnam, const char *pattern);
-int dfnmatchext2(const char *fnam, const char *pattern);
-int dfnmatch(const char *fnam, const char *pattern);
-int dfnmatch2(const char *fnam, const char *pattern);
-int dfnmatchEx(const char *fnam
- , const char *pattern
- , int (*matchfct)(const char *, const char *));
-int isUNCpath(const char * const fname);
-char *UNCpath(const char * const fname);
-int dfnwrdir(const char * const fnam);
-int dfnstat(const char * const fnam);
-int dfnmkfile(const char * const fnam);
-void dfn_tmpnam(char * const fnam);
-char *dfnmktmp(const char * const path, const char * const ext);
-char *dfnfilename(const char * const fnam);
-char *dfnextension(const char * const fnam);
-char *dfnfilenameext(const char * const fnam);
-char *dfnbakname(const char * const fnam);
-int dfnfreplace(const char * const newname, const char * const oldname);
-int dfndelim(const int ch);
-int dfndelim2(const int ch);
-char *dfnglobfilename(DFN_GLOB * const dir);
-char *dfnglobfullfilename(DFN_GLOB * const dir);
-DFN_GLOB *dfnglobinit(const char * const pattern, unsigned flags);
-int dfnglobread(DFN_GLOB *dir);
-void dfnglobfree(DFN_GLOB *dir);
-
-#endif
Deleted: freecom/trunk/suppl/src/dynstr.h
===================================================================
--- freecom/trunk/suppl/src/dynstr.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/dynstr.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,255 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* $Id$
- $Locker$ $Name$ $State$
-
- Dynamic string functions.
-
-ob(ject): dynstr
-su(bsystem): dynstr
-ty(pe):
-sh(ort description): Basic data type to represent a dynamic string
-lo(ng description):
-pr(erequistes):
-va(lue): a (char*) pointer, must be initialized prior use
-re(lated to):
-se(condary subsystems):
-in(itialized by): user
-wa(rning):
-bu(gs):
-co(mpilers):
-
-ob(ject): STR_SAVED_TOKENS
-su(bsystem): dynstr
-ty(pe):
-sh(ort description): data type for reentrant \tok{strtok()} function
-lo(ng description): This data type is used to save to and restore from
- reentrant information of the function \tok{StrTokenize()}.
-pr(erequistes):
-va(lue): Blackbox type used by \tok{StrTokSave()} and \tok{StrTokRestore()}
- only.
-re(lated to): StrTokenize StrTokSave StrTokRestore
-se(condary subsystems):
-in(itialized by): StrTokSave
-wa(rning):
-bu(gs):
-co(mpilers):
-
-ob(ject): STR_QUOTES
-su(bsystem): dynstr
-ty(pe):
-sh(ort description): data type for quote-related functions
-lo(ng description): This structure consists of members describing
- what quotes and character to be quoted the quote-related functions
- shall be aware of. The members enumerate the word delimiters,
- characters to be quoted, single character quotes, pairily used
- quotes and unpairily used quotes.
-pr(erequistes):
-va(lue):
-re(lated to): StrQuote StrUnquote StrAppQStr
-se(condary subsystems):
-in(itialized by): user
-wa(rning):
-bu(gs):
-co(mpilers):
-
-ob(ject): StrTokStop
-su(bsystem): dynstr
-ty(pe):
-sh(ort description): End a \fct{StrTokenize()} inspection
-lo(ng description): Instructres the function \fct{StrTokenize} to
- flush all internal values in order to return \fct{NULL} next time
- it is called and, therefore, definitely end a tokenizer loop \em{and}
- ensures that the string has been restored to its original value.
-pr(erequistes):
-va(lue): none
-re(lated to): StrTokenize
-se(condary subsystems):
-in(itialized by):
-wa(rning):
-bu(gs):
-co(mpilers):
-
-*/
-
-#ifndef __DYNSTR_H
-#define __DYNSTR_H
-
-#ifndef _MICROC_
-#include <string.h>
-#endif
-#include <portable.h>
-#include "sstr.h"
-#include "nls_c.h"
-
-struct STR_SAVED_TOKENS_ {
- char *str_next_saved_tokens;
- char str_ch_saved_tokens;
-};
-
-#ifdef _MICROC_
-#define STR_SAVED_TOKENS struct STR_SAVED_TOKENS_
-#else
-typedef struct STR_SAVED_TOKENS_ STR_SAVED_TOKENS;
-#endif
-
-/* Enumerates all quotes a string may be quoted with: */
-/* If one member is equal to NULL or "", the particular value
- does not exist. */
-struct STR_QUOTES_ {
- const char
- /* Characters that delimit two strings and must be quoted
- if they appear within a string. */
- *str_delimiters
- /* Characters that must be quoted if they appear within a
- string. */
- ,*str_toquote
- /* Characters that quote the immediately next character
- as the backslash '\' does in C. These quotes are
- still "active" within otherwise quoted strings. */
- ,*str_singleQuotes
- /* Characters that enclose a quoted string. The same character
- appears before and after the string, just like the '"' in C. */
- ,*str_pairyQuotes
- /* Characters that enclose a quoted string. The first character,
- the one on an even offset (first character has offset == 0),
- is the left quote, the second character is the right one.
- Compareble to parenthizes. */
- ,*str_unpairyQuotes
- /* Pairy and unpairy quotes (the left one is checked) that quote
- single quotes, too. */
- ,*str_fullQuotes
- ;
-};
-#ifdef _MICROC_
-#define STR_QUOTES STR_QUOTES_
-#else
-typedef struct STR_QUOTES_ STR_QUOTES;
-#endif
-
-#ifdef _MICROC_
-#define dynstr char *
-#else
-typedef char * dynstr;
-#endif
-
-int StriCmp(const char *s1, const char *s2);
-char *StrDup(const char * const s);
-
-#define StrChg(poi,size) StrChg_(&(poi), (size))
-char *StrChg_(char ** const poi, size_t len);
-
-#define StrFree(str) StrRepl_(&(str), 0)
-#define StrFree_(str) StrRepl_((str), 0)
-
-#define StrRepl(dest,src) StrRepl_(&(dest), (src))
-char *StrRepl_(char ** const dest, char * const src);
-
-#ifdef _MICROC_
-register char *StrConcat(int argcnt);
-register char *EStrConcat(int argcnt);
-#else
-char *StrConcat(int argcnt, ...);
-char *EStrConcat(int argcnt, ...);
-#endif
-
-char *StrTrim(char * const s);
-char *StrChar(int ch);
-char *StrStrip(char * const s, int ch);
-
-#define StrCpy(dest,src) StrCpy_(&(dest), (src))
-char *StrCpy_(char ** const dest, const char * const src);
-/* Copy (duplicate) the string src[] into dest.
- If src == NULL, this function is equal to StrFree(dest).
-
- Return:
- NULL: malloc() failed || src == NULL
- else: *dest
-*/
-
-#define StrAppDelimStr(dst,src,q) \
- StrAppDelimStr_(&(dst), (src), (q))
-char *StrAppDelimStr_(char ** const dst, const char * const src
- , const STR_QUOTES * const quotes);
-
-#define StrAppStr(dst,src) StrCat_(&(dst), (src))
-#define StrAppStr_ StrCat_
-#define StrCat(dest,src) StrCat_(&(dest), (src))
-char *StrCat_(char ** const dest, const char * const src);
-
-#define StrAppQStr(dst,src,quote_struct) \
- StrAppQStr_(&(dst), (src), (quote_struct))
-char *StrAppQStr_(char ** const dest, const char * const src
- , const STR_QUOTES * const quotes);
-
-#define StrAppChr(dest,chr) StrAppChr_(&(dest), (chr))
-char *StrAppChr_(char ** const dest, char chr);
-
-char *StrQuote(const char * const s, const STR_QUOTES * const quotes);
-
-char *StrUnquote(const char * const s, const STR_QUOTES * const quotes);
-
-int StrUnquoteTokenAppend(const char **src, const STR_QUOTES * const quotes
- , char ** const dst);
-
-int StrUnquoteToken(const char **src, const STR_QUOTES * const quotes
- , char ** const dst);
-
-
-char *StrTokenize(char *str, const char * const token);
-#define StrTokStop() (void)StrTokenize(0, 0)
-void StrTokSave(STR_SAVED_TOKENS *st);
-void StrTokRestore(STR_SAVED_TOKENS *st);
-
-char *StrLeft(const char * const s, size_t length);
-char *StrRight(const char * const s, size_t length);
-char *StrMiddle(const char * const s, size_t pos, size_t length);
-char *StrTail(const char * const s, unsigned pos);
-
-#ifdef _MICROC_
-#define StrBeg strbeg
-#else
-int StrBeg(const char * const s1, const char * const s2);
-#endif /* !defined(_MICROC_) */
-
-int StrCString(char *str);
-
-char *StrWord(char *s);
-
-char *StrChr(const char * const s, int ch);
-size_t StrnLen(const char * const s, size_t len);
-char *StrDupe(const char * const beg, const char * const end);
-
-#define StrEnd Strend
-//char *StrEnd(char *str);
-
-
-extern void *Emalloc(size_t len);
-extern void *Ecalloc(size_t len);
-extern void *Erealloc(void *p, size_t size);
-#define Esetsize(poi,size) Esetsize_(&(void*)(poi), (size))
-extern void *Esetsize_(void **poi, size_t size);
-#define Eresize(poi,size) Eresize_((void**)&(poi), (size))
-extern void *Eresize_(void **poi, size_t size);
-extern char *Estrdup(const char * const str);
-#define Estrchg(var,str) Estrchg_(&(var),(str))
-extern char *Estrchg_(char ** const pvar, const char * const str);
-extern char *Estrdupe(const char * const start, const char * const end);
-
-#endif
Deleted: freecom/trunk/suppl/src/environ.h
===================================================================
--- freecom/trunk/suppl/src/environ.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/environ.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,191 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* $Id$
- * $Locker$ $Name$ $State$
-
- Declaration of the subsystem environ
-
-ob(ject):
-su(bsystem): environ
-ty(pe):
-sh(ort description): Type of the walkfunction passed to \fct{env_forAll}
-lo(ng description):
-pr(erequistes):
-va(lue):
-re(lated to):
-se(condary subsystems):
-in(itialized by):
-wa(rning):
-bu(gs):
-co(mpilers):
-
-*/
-
-#ifndef __ENVIRON_H
-#define __ENVIRON_H
-
-#include <portable.h>
-
-#ifdef _MICROC_
-#define ENV_WALKFUNC int *
-#else
-typedef int (*ENV_WALKFUNC)(void *, word, word);
-#endif
-
-#ifndef _MICROC_
-/* In order to use these macros, <dos.h> must be #include'd */
-#define env_glbSeg peekw(_psp, 0x2c) /* return the current env seg addr */
-#define env_setGlbSeg(a) pokew(_psp, 0x2c, (a)) /* set the current env seg addr */
-#else
-#define env_glbSeg env_glbSeg_()
-#define env_setGlbSeg env_setGlbSeg_
-#endif
-
-/* SUPPL may support two "default" segments:
- env_glbSeg - the global segment as defined by the PSP, and
- env_dfltSeg - an user-defined env segment, which is to replace the
- global segment fully (in regards of SUPPL)
-
- Environment functions, that excepts "0" as environent segment, expand
- use env_dfltSeg first, env_glbSeg then.
-
- The portable way is to use the function, though, for speed efficency
- they are implemented via a global variable.
-*/
-#define env_dfltSeg (suppl_dfltEnvSegm)
-#define env_setDfltSeg(value) (suppl_dfltEnvSegm = (value))
-
-
-extern unsigned env_resizeCtrl;
-/* Standard settings:
- deny shrinking & moving, use UMBs, best fit */
-#define ENV_SHRINKBELOW 1 /* resize below last used byte (will destroy
- environment, is necessary to delete env) */
-#define ENV_ALLOWMOVE 2 /* re-allocate environment segment if grow
- fails */
-#define ENV_USEUMB 4 /* when env moves, search in UMBs first */
-#define ENV_FIRSTFIT 8 /* when env moves, use allocation stragegy First Fit */
-#define ENV_LASTFIT 16 /* when env moves, use allocation stragegy Last Fit */
- /* If both ENV_FIRSTFIT & ENV_LASTFIT are set, behaviour is undefined */
- /* If none of the above are set, Best Fit is used */
-
-/* Defines for the env_replace() function: */
-#define ENV_DELETE 1 /* free old environment segment */
-#define ENV_COPY 2 /* copy old environment into new
- segment, may destroy the environment, if
- new seg is smaller than old one. */
-#define ENV_CLEAR 4 /* initialize new environment, so it does not
- contain neither variables nor strings */
-#define ENV_CREATE 8 /* create a new environment */
-#define ENV_FREECOUNT 16 /* minimum amount of unused bytes specified */
-#define ENV_LIMITED 32 /* create smallest possible enviroment */
-
-
-/*!!!!!!!!!
- All these functions replace segm by the current used environment if
- it is zero. The environment must be initialized with the environement
- variable area and the string area (in the simpliest case, three byes 0).
- !!!!!!!!!*/
-
-#ifdef _MICROC_
-word env_glbSeg_(void);
-void env_setGlbSeg_(const word segm);
-#endif
-
-word env_create(const unsigned length);
-void env_delete(const word segm);
-void env_clear(word segm);
-int cpyenv(const char * const var, char * const dst, const unsigned length);
-int env_get(word segm, const char * const var, char * const dst, const unsigned length);
-char *dupvar(const char * const var);
-char *env_dupvar(word segm, const char * const var);
-char *env_fetch(word segm, const char * const var);
-int putenv(const char *var);
-#define chgenv(name,value) env_change(0,name,value)
-int env_change(word segm, const char * const var, const char * const value);
-int env_ovrVarOffset(word segm, word ofs, const char *varname
- , const char * const value);
-int env_insVarOffset(word segm, word ofs, const char * const varname
- , const char * const value);
-
-#ifndef NO_ENV_REPLACE_PROTOTYPE
-#ifdef _MICROC_
-register word env_replace(word env /*, int mode, word segm/length*/);
-#else
-word env_replace(word env, int mode, ... /*word segm/length*/);
-#endif
-#endif
-
-int env_matchVar(word segm, char * const var);
-int env_findAnyVar(word segm, const char * const var, word *ecase, word *icase);
-
-int env_noSpace(word segm, const char * const name, const char * const value, const word ign);
-word env_resize(word segm, int delta);
-word env_setsize(word segm, unsigned length);
-#define env_newsize(s,l) env_setsize((s), (l))
-int env_forAll(word env, ENV_WALKFUNC fct, void *arg);
-word env_master(void);
-word env_shell(void);
-
-/*********
- Environment String handling functions
- *********/
-
-int env_nullStrings(word segm);
-
-/* int env_strings(const word segm); */
-#define env_strings(segm) env_strcounter((segm), 0)
-int env_strcounter(word segm, int diff);
-word env_string(const word segm, int stringNr);
-int env_strcpy(word segm, char * const buf, const int len, const int stringNr);
-char *env_strdup(word segm, const int stringNr);
-int env_strput(word segm, const char * const buf, const int stringNr);
-int env_strinsert(word segm, const char * const buf, const int stringNr);
-
-/*********
- DO NOT PASS ZERO INTO THESE FUNCTIONS!!!
- *********/
-
-
-word env_findVar(const word segm, const char * const var);
-void env_subVarOffset(const word segm, const word offset);
-int env_appVar(word segm, const char * const name, const char * const value);
-
-int env_check(const word segm);
-/* Check the environemnt, the return value:
- 0: environment OK
- 1: no environment at all (envseg is NULL)
- 2: PSP corrupt (envseg points to an invalid memory block)
- 3: variable's space corrupted
- 4: no string table
- 5: string table corrupted or no string table at all
-*/
-
-word env_firstFree(const word segm);
-word env_endOfVars(const word segm);
-word env_freeCount(const word segm);
-unsigned env_varlen(const word segm, const word offs);
-void env_relocateSegment(const word segm, const word tosegm);
-
-
-/* Private variables made public for efficency purpose only.
- Any use of them is highly unportable! */
-extern word suppl_dfltEnvSegm;
-
-#endif
Deleted: freecom/trunk/suppl/src/errcodes.h
===================================================================
--- freecom/trunk/suppl/src/errcodes.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/errcodes.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,49 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* $Id$
- $Locker$ $Name$ $State$
-
- Error codes used by most functions returning (int) error
- codes within SUPPL
-
-*/
-
-#ifndef __ERRCODES_H
-#define __ERRCODES_H
-
-#define ESUPPL_NONE 0 /* no error */
-#define ESUPPL_OK 0 /* no error */
-#define ESUPPL_ZERO 0 /* no error */
-#define ESUPPL_MEM 1 /* out of memory */
-#define ESUPPL_NOMEM ESUPPL_MEM
- /* env: environment segment too small */
-#define ESUPPL_MISSINFO 2 /* missing information */
-#define ESUPPL_FPATH 30 /* ill-formed filename path */
-#define ESUPPL_FACCESS 31 /* file access error */
-#define ESUPPL_INIT 40 /* Not initialized */
-
-#define ESUPPL_INVAL 50 /* Invalid argument, argument out of range */
-#define ESUPPL_INVENV 51 /* Invalid environment */
-#define ESUPPL_RANGE 52 /* Result too large */
- /* env: returned string too large for buffer */
-#define ESUPPL_NOENV 53 /* No environment at all */
-#define ESUPPL_NOENT 55 /* No entry / no such file or directory */
- /* env: no such variable / string */
-
-#endif
Deleted: freecom/trunk/suppl/src/external.h
===================================================================
--- freecom/trunk/suppl/src/external.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/external.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,30 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-#ifndef __EXTERNAL_H
-#define __EXTERNAL_H
-
-extern char *ARGV[];
-extern int ARGC;
-extern unsigned PSP;
-extern unsigned _AX_, _BX_, _CX_, _DX_, _DI_, _SI_;
-extern unsigned char Longreg[];
-extern unsigned IOB_size;
-
-#define fileno(a) ((a)->FILE_handle)
-#endif
Deleted: freecom/trunk/suppl/src/fmemory.h
===================================================================
--- freecom/trunk/suppl/src/fmemory.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/fmemory.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,87 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* $Id$
- $Locker$ $Name$ $State$
-
- Far memory handling function.
-
-*/
-
-#ifndef __FMEMORY_H
-#define __FMEMORY_H
-
-#include <SUPL_DEF.H>
-
-#ifdef _MICROC_ /* for use for Micro-C only */
-
-#define MK_FP(seg,ofs) (seg), (ofs)
-#define TO_FP(var) get_ds(), (var)
-#define _fnormalize(seg,ofs) _fnormalize_(&(seg), &(ofs))
-
-#else /* !_MICROC_ */
-
-#ifdef _TC_LATER_
-#include <string.h>
-
-#else /* !_TC_LATER_ */
-#if defined(_PAC_NOCLIB_) || defined(_TC_EARLY_)
-
-#ifdef _PAC_NOCLIB_
-#include <stdlib.h>
-#define _fmemcpy farmemcpy
-#define _fmemset farmemset
-
-#else /* !_PAC_NOCLIB_ */
-void _fmemcpy(void far * const dst, const void far * const src, unsigned length);
-void _fmemset(void far * const dst, int ch, unsigned length);
-#endif /* _PAC_NOCLIB_ */
-
-unsigned _fstrlen(const char far * const s);
-char far *_fstrchr(const char far * const s, int ch);
-char far *_fmemchr(const char far * const s, int ch, unsigned length);
-void _fmemmove(void far * const dst, const void far * const src, unsigned length);
-int _fmemcmp(const void far * const dst, const void far * const src, unsigned length);
-int _fmemicmp(const void far * const dst, const void far * const src, unsigned length);
-int _fstrcmp(const char far * const dst, const char far * const src);
-int _fstricmp(const char far * const dst, const char far * const src);
-void _fstrcpy(char far * const dst, const char far * const src);
-
-#endif /* defined(_PAC_NOCLIB_) || defined(_TC_EARLY_) */
-#endif /* _TC_LATER_ */
-
-#if defined(HI_TECH_C) || defined(_TC_EARLY_)
-#endif
- /* HiTech C has no huge pointers
- & early Turbo C does ignore the cast */
- /* In some circumstances any Borland C compiler do ignore the
- cast, so the macro is not suitable */
-void far *_fnormalize(void far *poi);
-/* #define _fnormalize(poi) ((void huge *)(poi)) */
-
-char *_fdupstr(const char far * const s);
-#endif /* _MICROC_ */
-
-#ifdef _MICROC_
-unsigned _fstpcpy(unsigned const dseg, unsigned dofs
- , unsigned const sseg, unsigned sofs, unsigned length)
-#else /* !_MICROC_ */
-char far* _fstpcpy(char far* const dst, const char far* const src);
-#endif /* _MICROC_ */
-
-#endif
Deleted: freecom/trunk/suppl/src/getopt.h
===================================================================
--- freecom/trunk/suppl/src/getopt.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/getopt.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,82 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* $Id$
- $Locker$ $Name$ $State$
-
- Declarations of the GETOPT subsystem.
-
- If macro GETOPT_LONG_NO_FLAG_MEMBER is defined before #including this
- header, the 'options' structure does not contain the 'flag'
- member.
-
-*/
-
-#ifndef __GETOPT_H
-#define __GETOPT_H
-
-#include <portable.h>
-
-struct option {
- const char *name;
- int has_arg;
-#ifndef GETOPT_LONG_NO_FLAG_MEMBER
- int *flag;
-#endif
- int val;
-};
-
-struct getopt_save_t {
- int gs_optind, gs_opterr;
- const char *gs_optcur;
-};
-
-extern int optind, /* index into argv[] array */
- optopt, /* unmodified last-read character */
- opterr; /* if non-zero, visually displays errors */
-extern char *optarg; /* address of argument of an argumented option */
-extern const char *optcur; /* address of next character to parse as
- option; if NULL, uses argv[optind] */
-
-int getopt(int argc, const char * const * const argv, const char * const options);
-
-int getopt_long(int argc, const char * const * const argv
- , const char * const optstring
- , const struct option * const longopts, int * const longindex);
-int getopt_long_only(int argc, const char * const * const argv
- , const char * const optstring
- , const struct option * const longopts, int * const longindex);
-int getopt_long_noFlag(int argc, const char * const * const argv
- , const char * const optstring
- , const struct option * const longopts, int * const longindex);
-int getopt_long_only_noFlag(int argc, const char * const * const argv
- , const char * const optstring
- , const struct option * const longopts, int * const longindex);
-
-#ifdef GETOPT_LONG_NO_FLAG_MEMBER
-#define getopt_long getopt_long_noFlag
-#define getopt_long_only getopt_long_only_noFlag
-#endif
-
-#define getopt_save(s) getopt_save_(aS(s))
-void getopt_save_(struct getopt_save_t * const sbuf);
-#define getopt_restore(s) getopt_restore_(aS(s))
-void getopt_restore_(struct getopt_save_t * const sbuf);
-void getopt_init(void);
-
-#endif
Deleted: freecom/trunk/suppl/src/mcb.h
===================================================================
--- freecom/trunk/suppl/src/mcb.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/mcb.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,79 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* $Id$
- * $Locker$ $Name$ $State$
- *
- * header file for the MCB handling functions
-
-*/
-
-#ifndef __MCB_H
-#define __MCB_H
-
-#include <portable.h>
-
-#define SEG2MCB(segm) ((segm) - 1)
-#define MCB2SEG(mcb) ((mcb) + 1)
-
- /* Don't use this constant; use SEG2MCB() or MCB2SEG() instead */
-#define SEG_OFFSET 0x10
-
-word mcb_env(const word segm);
-#ifdef NDEBUG
-#define mcb_env(mcb) peekw((mcb), SEG_OFFSET + 0x2c)
-#endif
-
-#include <algnbyte.h>
-struct MCB {
- byte mcb_type; /* type of MCB, 'Z': no following MCB, 'M': following */
- word mcb_ownerPSP; /* PSP number of owner of this block */
- word mcb_size; /* size of this MCB */
- byte mcb_rsrvd[3]; /* unused */
- byte mcb_name[8]; /* name of program file name if PSP created in exec() */
-};
-#include <algndflt.h>
-struct SUPPL_verify_alignment_MCB {
- char x[sizeof(struct MCB) == 16 ? 1 : -1];
-};
- /* Don't use these constant; use offsetof(struct MCB, xxx) instead */
-#define MCB_OFF_TYPE 0
-#define MCB_OFF_OWNER 1
-#define MCB_OFF_SIZE 3
-#define MCB_OFF_NAME 8
-
-#ifdef _MICROC_
-#define MCB_WALKFUNC int *
-#else
-typedef int (*MCB_WALKFUNC)(void *, word);
-#endif
-
-unsigned mcb_length(const word segm);
-int mcb_walk(word mcb, const MCB_WALKFUNC fct, void * const arg);
-int isShell(const word mcb);
-int isPSP(const word mcb);
-int isMCB(const word mcb);
-int isEnv(const word mcb);
-word nxtMCB(word mcb);
-int mcb_allParents(word mcb, MCB_WALKFUNC fct, void *arg);
-word mcb_primaryShell(void);
-word mcb_owner(word mcb);
-word mcb_shell(word mcb);
-word mcb_first(void);
-
-#endif
Deleted: freecom/trunk/suppl/src/msgs.h
===================================================================
--- freecom/trunk/suppl/src/msgs.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/msgs.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,58 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* $Id$
- $Locker$ $Name$ $State$
-
- SUPPL message implementation
-
- Each of these functions emit one particular error.
-
- One can create a library implementing just these functions and
- link it _before_ SUPPL, and one gets an user-specific error handling.
-
-*/
-
-#ifndef __MSGS_H
-#define __MSGS_H
-
-#include <portable.h>
-#include "msgs_w.loc"
-
-void Esuppl_argMissing(char ch);
-void Esuppl_nonArgOption(char ch);
-void Esuppl_argOption(char ch);
-void Esuppl_lArgOption(const char * const name);
-void Esuppl_option(char ch); /* option not found */
-void Esuppl_lOption(const char * const name); /* option not found */
-void Esuppl_longOption(void);
-void Esuppl_noMem(void);
-void Esuppl_writeFile(const char * const fnam);
-void Esuppl_accessFile(const char * const fnam);
-void Esuppl_openFile(const char * const fnam);
-void Esuppl_createFile(const char * const fnam);
-void Esuppl_readFile(const char * const fnam);
-void Esuppl_creatTmpFnam(void);
-void Esuppl_tmpOpen(const char * const fnam);
-void Esuppl_wrCfgFile(const char *fnam);
-void Esuppl_ovrLinkcount(const char *fnam);
-
-extern void hlpScreen(void);
-extern const char Y_noFNam[];
-
-#endif
Deleted: freecom/trunk/suppl/src/nls.h
===================================================================
--- freecom/trunk/suppl/src/nls.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/nls.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,56 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* $Id$
- $Locker$ $Name$ $State$
-
- DOS NLS implementation -- "use" functions of the NLS info
-
-*/
-
-#ifndef __NLS_H
-#define __NLS_H
-
-#include "cntry.h"
-
-struct SupplTime { /* Universial time/date structure */
- /* This structure is used by all NLS time/date based
- functions and may be initialized partially only */
- int ti_hour, ti_minute, ti_second, ti_hundred;
- int ti_day, ti_month, ti_year;
- int ti_weekday;
-};
-
-#ifndef _MICROC_
-typedef struct SupplTime nlstime;
-#else
-#define nlstime struct SupplTime
-#endif
-
-/*
- * Fill in the time portions: hour, minute, seconds, hundred seconds
- */
-void nlsCurTime(nlstime *t);
-
-/*
- * Fill in the date portions: day, month, year
- */
-void nlsCurDate(nlstime *t);
-
-
-#endif /*# !defined(__CNTRY_H) */
Deleted: freecom/trunk/suppl/src/nls_c.h
===================================================================
--- freecom/trunk/suppl/src/nls_c.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/nls_c.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,57 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* $Id$
- $Locker$ $Name$ $State$
-
- NLS-depended dynamic string functions.
-
-*/
-
-#ifndef __NLS_C_H
-#define __NLS_C_H
-
-#include <portable.h>
-
-int toLower(int ch);
-int toUpper(int ch);
-int toFUpper(int ch);
-
-#define memcmpI MemiCmp
-int MemiCmp(const byte *buf1, const byte *buf2, unsigned len);
-
-#define _fmemcmpI _fMemiCmp
-#ifdef _MICROC_
-int _fMemiCmp(unsigned const dseg, unsigned dofs
- , unsigned const sseg, unsigned sofs, unsigned length);
-#else
-int _fMemiCmp(const byte far * dest, const byte far * src, unsigned length);
-#endif
-
-int StriCmp(const char *s1, const char *s2);
-char *StrUpr(char s[]);
-char *MemUpr(char buf[], unsigned length);
-void _fStrUpr(const word dseg, word dofs);
-void _fMemUpr(const word dseg, word dofs, unsigned length);
-
-int isodigit(int ch);
-#define isodigit(ch) ((ch) >= '0' && (ch) <= '7')
-int toxdigit(int ch);
-
-
-#endif
Deleted: freecom/trunk/suppl/src/nls_f.h
===================================================================
--- freecom/trunk/suppl/src/nls_f.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/nls_f.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,47 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* $Id$
- $Locker$ $Name$ $State$
-
- Declarations for NLS depended DOS filename functions.
-
-*/
-
-#ifndef __NLS_F_H
-#define __NLS_F_H
-
-#include <portable.h>
-
-int toFUpper(int ch);
-
-#define memcmpFI MemFCmp
-int MemFCmp(const void *buf1, const void *buf2, unsigned len);
-
-#define _fmemcmpFI _fMemFCmp
-#ifdef _MICROC_
-int _fMemFCmp(unsigned const dseg, unsigned dofs
- , unsigned const sseg, unsigned sofs, unsigned length);
-#else
-int _fMemFCmp(const void far * dest, const void far * src, unsigned length);
-#endif
-
-char *StrFUpr(char s[]);
-void *MemFUpr(void * const buf, unsigned length);
-
-#endif
Deleted: freecom/trunk/suppl/src/psp.h
===================================================================
--- freecom/trunk/suppl/src/psp.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/psp.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,83 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* $Id$
- * $Locker$ $Name$ $State$
- *
- * header file for PSP settings
-
-*/
-
-#ifndef __PSP_H
-#define __PSP_H
-
-#include <portable.h>
-
-#include <algnbyte.h>
-
-struct PSP {
- byte psp_cpm_call0[2]; /* CP/M style program termination entry
- --> INT 20h (0xCD 0x20) */
- word psp_freeSegm; /* segm of first free byte above process */
- byte psp_os2_fakeDOSversion;
- byte psp_cpm_call5[5]; /* FAR CALL to absolute 000C0h */
- void far*psp_oldInt22; /* value of INT-22 restored on exit (return) */
- void far*psp_oldInt23; /* value of INT-23 restored on exit (^Break) */
- void far*psp_oldInt24; /* value of INT-24 restored on exit (CritErr) */
- word psp_parentPSP;
- byte psp_jft[20];
- word psp_envSegm;
- void far*psp_lastStack; /* SS:SP on last INT-21 */
- word psp_jft_numEntries;
- byte far *psp_jft_addr;
- struct PSP far*psp_share_prevPSP;
- byte psp_dbcs_consoleFlag;
- byte psp_append_truenameFlag;
- byte psp_os2_flags;
- byte psp_netware_taskNumber; /* valid if os2_flags == 0xCE */
- byte psp_dosVersion[2]; /* returned on DOS-30 */
- word psp_pdb_selectorNext;
- word psp_pdb_parition;
- word psp_pdb_next;
- byte psp_win_flags; /* bit 0: set -> non-win app (==WINOLDAP) */
- byte psp_reserved1;
- byte psp_reserved1_1[2]; /* Missing from RBIL v6.1 */
- word psp_pdb_entryStack;
- byte psp_reserved2[2];
- byte psp_serviceRequest[3]; /* INT 21h / RETF */
- byte psp_reserved3[2];
- byte psp_extFCB1[7];
- byte psp_fcb1[16];
- byte psp_fcb2[16];
- byte psp_reserved4[4];
- union {
- byte psp_dta[128];
- struct {
- byte psp_cmdlineLength;
- byte psp_cmdline[127];
- };
- };
-};
-
-#include <algndflt.h>
-
-struct SUPPL_verify_alignment_PSP {
- char x[sizeof(struct PSP) == 128 ? 1 : -1];
-};
-
-#endif
Deleted: freecom/trunk/suppl/src/sstr.h
===================================================================
--- freecom/trunk/suppl/src/sstr.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/sstr.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,117 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* This file was automatically generated from SSTR.SRC */
-/* $Id$
- $Locker$ $Name$ $State$
-
- Secure string functions.
-
- They accept NULLs as string/memory pointers.
-
-*/
-
-#ifndef __SSTR_H
-#define __SSTR_H
-
-#ifndef _MICROC_
-#include <string.h>
-#endif
-#include <portable.h>
-
-#define Strcmpi Stricmp
-#define Strncmpi Strnicmp
-#define Memcmpi Memicmp
-
-
-
-/* Generated string function replacements */
-void *Memccpy(void *dst, void const *src, int ch, size_t length);
-void *Memchr(void const *s, int ch, size_t length);
-int Memcmp(char const *s1, char const *s2, size_t length);
-void *Memcpy(void *dst, void const *src, size_t length);
-int Memicmp(char const *s1, char const *s2, size_t length);
-void *Memmove(void *dst, void const *src, size_t length);
-void *Memset(void *s, int ch, size_t length);
-char *Stpcat(char *dst, char const *src);
-char *Stpcpy(char *dst, char const *src);
-char *Strcat(char *dst, char const *src);
-char *Strchr(char const *s, int ch);
-int Strcmp(char const *s1, char const *s2);
-int Strcoll(char const *s1, char const *s2);
-char *Strcpy(char *dst, char const *src);
-size_t Strcspn(char const *str, char const *chset);
-char *Strdup(char const *s);
-int Stricmp(char const *s1, char const *s2);
-size_t Strlen(char const *s);
-char *Strlwr(char *s);
-char *Strncat(char *dst, char const *src, size_t length);
-int Strncmp(char const *s1, char const *s2, size_t length);
-char *Strncpy(char *dst, char const *src, size_t length);
-int Strnicmp(char const *s1, char const *s2, size_t length);
-char *Strnset(char *s, int ch, size_t length);
-char *Strpbrk(char const *str, char const *chset);
-char *Strrchr(char const *s, int ch);
-char *Strrev(char *s);
-char *Strset(char *s, int ch);
-size_t Strspn(char const *str, char const *chset);
-char *Strstr(char const *str, char const *substr);
-char *Strtok(char *str, char const *delim);
-char *Strupr(char *s);
-char *Strend(char *s);
-
-
-#ifdef SUPPL_STR_REMAP
- /*Remap standard function names to replacements */
-
-#define strupr Strupr
-#define stricmp Stricmp
-#define memmove Memmove
-#define stpcpy Stpcpy
-#define strspn Strspn
-#define strchr Strchr
-#define strnset Strnset
-#define strcoll Strcoll
-#define memicmp Memicmp
-#define strnicmp Strnicmp
-#define stpcat Stpcat
-#define memccpy Memccpy
-#define strcpy Strcpy
-#define strcspn Strcspn
-#define memcpy Memcpy
-#define strlwr Strlwr
-#define strncpy Strncpy
-#define strlen Strlen
-#define strstr Strstr
-#define strrev Strrev
-#define memset Memset
-#define memchr Memchr
-#define strcmp Strcmp
-#define memcmp Memcmp
-#define strncat Strncat
-#define strcat Strcat
-#define strdup Strdup
-#define strtok Strtok
-#define strncmp Strncmp
-#define strrchr Strrchr
-#define strset Strset
-#define strpbrk Strpbrk
-#define strend Strend
-#endif /* defined(SUPPL_STR_REMAP) */
-
-#endif
Deleted: freecom/trunk/suppl/src/str.h
===================================================================
--- freecom/trunk/suppl/src/str.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/str.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,94 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* $Id$
- $Locker$ $Name$ $State$
-
- Supplemental string functions.
-
-ob(ject): utoa10
-su(bsystem): misc
-ty(pe): M
-sh(ort description): Transform an unsigned decimal number into ASCII format
-lo(ng description): Transforms an unsigned decimal number into its ASCII
- representation.
-pr(erequistes): buf != NULL
-va(lue): none
-re(lated to): itoa10
-se(condary subsystems):
-in(itialized by):
-wa(rning):
-bu(gs):
-co(mpilers):
-
-ob(ject): itoa10
-su(bsystem): misc
-ty(pe): M
-sh(ort description): Transform a signed decimal number into ASCII format
-lo(ng description): Transforms a signed decimal number into its ASCII
- representation.
-pr(erequistes): buf != NULL
-va(lue): none
-re(lated to): utoa10
-se(condary subsystems):
-in(itialized by):
-wa(rning):
-bu(gs):
-co(mpilers):
-
-*/
-
-#ifndef __STR_H
-#define __STR_H
-
-#ifndef _MICROC_
-#include <stdlib.h>
-#include <string.h>
-#endif
-#include <portable.h>
-
-char *skipws(const char *s);
-char *skipwd(const char *s);
-char *singleword(char *s);
-
-/* void itoa10(int num, char * const buf); */
-/* void utoa10(int num, char * const buf); */
-#ifndef _MICROC_
-#define itoa10(num,buf) itoa((num), (buf), 10)
-#define utoa10(num,buf) ultoa((unsigned)(num), (buf), 10)
-#else
- /* negative radix --> signed */
-#define itoa10(num,buf) itoa((num), (buf), -10)
- /* positive radix --> unsigned */
-#define utoa10(num,buf) itoa((num), (buf), 10)
-#endif
-
-int strnum(const char * const s, int * const num, char ** const endp);
-int strbool(char *s);
-
-/* memzero() fills a block of memory with 0; used throughout
- SUPPL where a larger amount of values of data types: (int), (short),
- (char) and pointers are to initialize with 0 or NULL.
- It is unportable, but efficient on portable systems; because of this
- macro places, where to port on failure, are easy to locate. */
-/* void memzero(void *poi, size_t length); */
-#define memzero(poi,length) memset((poi), 0, (length))
-#define memzerobj(object) memzero(&object,sizeof(object))
-#define memzerostrct(structure) memzero(aS(structure),sizeof(structure))
-
-#endif
Deleted: freecom/trunk/suppl/src/supl_def.h
===================================================================
--- freecom/trunk/suppl/src/supl_def.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/supl_def.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,49 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-#ifndef __SUPPL_COMPILER_DEFINES
-#define __SUPPL_COMPILER_DEFINES
-
-/**********************************
- ***** Pacific HiTech C
- **********************************/
-#ifdef HI_TECH_C
- /* Probe if PAC is used in conjunction with CLib */
-#include <stddef.h>
-
-#ifdef _CLIB_
-#define _PAC_ 1
-#else
-#define _PAC_NOCLIB_ 1
-#endif /* _CLIB_ */
-
-#endif /* HI_TECH_C */
-
-
-/**********************************
- ***** Early Turbo C++
- **********************************/
-#ifdef __TURBOC__
-#if __TURBOC__ <= 0x297
-#define _TC_EARLY_
-#else
-#define _TC_LATER_
-#endif
-#endif
-
-#endif
Deleted: freecom/trunk/suppl/src/suppl.h
===================================================================
--- freecom/trunk/suppl/src/suppl.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/suppl.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,342 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* $Id$
- $Locker$ $Name$ $State$
-
- Declarations for the supplemental functions.
-
- This header file is part of the "portable" subsystem
- and will be removed, or moved to another purpose.
-
-*/
-
-#ifndef __SUPPL_H
-#define __SUPPL_H
-
-#include <stdio.h>
-
-#include <supl_def.h>
-
-#include <portable.h>
-
-#define itemsof(array) (sizeof(array) / sizeof(array[0]))
-#define NIL(type) ((type)0)
-
-/* length of the longmath numbers. */
-#define LSIZE sizeof(dword)
-
-#ifndef _MICROC_
-
-#define longsubi(a,b) ((a) -= (int)(b))
-#define longsubu(a,b) ((a) -= (unsigned)(b))
-#define longaddi(a,b) ((a) += (int)(b))
-#define longaddu(a,b) ((a) += (unsigned)(b))
-#define longmuli(a,b) ((a) *= (int)(b))
-#define longmulu(a,b) ((a) *= (unsigned)(b))
-#define longdivi(a,b) ((a) /= (int)(b))
-#define longdivu(a,b) ((a) /= (unsigned)(b))
-#define longseti(a,b) ((a) = (int)(b))
-#define longsetu(a,b) ((a) = (unsigned)(b))
-#define longshln(a,c) ((a) <<= (c))
-#define longshrn(a,c) ((a) >>= (c))
-int longcmp(long d1, long d2);
-#define longcmp_(a,b) ((signed long)(a) - (signed long)(b))
-#define longsgn(a) ((signed long)(a))
-#define longclr(a) ((a) = 0)
-
-#define poked(seg,ofs,value) (*(dword far*)MK_FP(seg,ofs) = (value))
-#define pokedd(seg,ofs,hi,lo) (*(dword far*)MK_FP(seg,ofs) = ((dword)(hi)<<16)|(lo))
-#define peekd(segm,ofs,value) ((value) = *(dword far*)MK_FP(segm,ofs))
-int peekdd(word segm, word ofs, word *valHi, word *valLo);
-
-typedef char far *fartbl; /* far table */
-#define dpeekc(fartable,idx) (*(((char far *)fartable) + (idx)))
-#define dpeekb(fartable,idx) (*(((byte far *)fartable) + (idx)))
-#define dpeekw(fartable,idx) (*(word far*)(((byte far *)fartable) + (idx)))
-
-#define _fmemcmpi _fmemicmp
-#define _fstrcmpi _fstricmp
-#define memcmpi memicmp
-
-#ifdef _PAC_NOCLIB_
-int memicmp(const void *s1, const void *s2, unsigned len);
-void *memccpy(void *s1, const void *s2, int ch, size_t len);
-#endif
-
-#else /* defined(_MICROC_) */
-
-#define longcmp_ longcmp
-#define longsgn(a) (longtst(a) && ((int*)(a))[1])
-
-#define fartbl dword /* pointer to far table */
-//char dpeekc(fartbl fartable, int idx);
-#define dpeekc(tbl,idx) (char)dpeekb((tbl), (idx))
-int dpeekb(fartbl fartable, int idx);
-word dpeekw(fartbl fartable, int idx);
-int memicmp(const void *s1, const void *s2, unsigned len);
-void *memccpy(void *s1, const void *s2, int ch, size_t len);
-
-#endif /* !defined(_MICROC_) */
-
-
-
-#define putcm fputcm
-int fputmc(int ch, int cnt, FILE *f);
-/* Emit the same character several times into the stream
-*/
-
-
-word DOSalloc(const word length, const int mode);
-/* Allocate a chunk of memory directly via the DOS API.
- length is the number of paragraphes that shall be allocated.
- mode is the allocation strategy to be used.
-
- If mode specifies to use high memory, the high memory will be
- automatically made accessable.
-
- If the bit 0x10 of mode is set, length is ignored and the size of
- the largest unallocated block is returned, which can be allocated
- later.
-
- This function does not alter the allocation strategy permanently.
-
- Return:
- 0: Allocation failed
- else: if 0x10 of mode was clear: segment address of allocated memory
- if 0x10 of mode was set: the largest unallocated block
-*/
-
-int DOSresize(const word segm, const word length);
-/* Resize a chunk of memory directly via the DOS API.
- segm is the segment to resize, it must be allocated via the DOS API
- or a comparable function, like DOSalloc(), allocBlk().
- length is the new number of paragraphes.
-
- If to resize the segment fails, the block of memory is not relocated
- into a larger space of the DOS memory.
-
- Return:
- 0: resize failed
- !0: resize OK
-*/
-
-int DOSfree(const word segm);
-/* Free a chunk of memory directly via the DOS API.
- segm is the segment to resize, it must be allocated via the DOS API
- or a comparable function, like DOSalloc(), allocBlk().
-
- Return:
- 0: free OK
- !0: DOS error code
-*/
-
-//word allocBlk(const unsigned length, const int allocMode);
-#define allocBlk(length,allocMode) DOSalloc(BLK_byte2para(length), allocMode)
-/* Allocates a block of memory using the DOSalloc() function.
- The only difference is the \xAFlength\xAE parameter:
- Here it is the requested length of the block in bytes, thus,
- the block can contain only 0..65535 bytes (up to 64KB).
-*/
-
-#ifdef _MICROC_
-word resizeBlk(const word segm, const unsigned length);
-#else
-#define resizeBlk(segm,length) DOSresize(segm, BLK_byte2para(length))
-#endif
-/* Resizes the segment using the DOSresize() function.
- The only difference is the \xAFlength\xAE parameter:
- Here it is the requested length of the block in bytes, thus,
- the block can contain only 0..65535 bytes (up to 64KB).
-*/
-
-//int freeBlk(const word segm);
-#define freeBlk DOSfree
-/* Free the segment using the DOSfree() function.
- No differences, only for completeness.
-*/
-
-unsigned BLK_byte2para(const unsigned bytes);
-/* Return the number of paragraphes that will be needed to store \xAFbytes\xAE
- bytes in.
-
- If bytes == 0, the return value is zero, too.
-
-*/
-
-int addu(unsigned *u1, unsigned u2);
-/* Performs the operation:
- *u1 += u2;
- and returns, if an overflow occured.
-
- Return: 0: no overflow
- !0: overflow
-*/
-#ifdef __WATCOMC__
-#ifdef FARDATA
-#pragma aux addu = \
- "add word ptr es:[bx], ax" \
- "sbb ax, ax" \
- parm [es bx] [ax] \
- value [ax] \
- modify [es bx]
-#else
-#pragma aux addu = \
- "add word ptr [bx], ax" \
- "sbb ax, ax" \
- parm [bx] [ax] \
- value [ax] \
- modify [bx]
-#endif
-#endif
-
-int invokeDOS(nM(IREGS *prp));
-/* Invoke DOS using intr(0x21, prp).
-
- Return:
- 0: DOS returned with Carry flag cleared
- !0: AX value (DOS error code) if DOS returned with Carry flag set
-*/
-
-#ifndef _CLIB_
-char *stpcat(char * const dst, const char * const src);
-/* Append src to dst and return the address of the '\0' character of dst
-*/
-#endif
-
-
-#ifdef __WATCOMC__
-char *stpcpy(char * const dst, const char * const src);
-/* Copy src into dst
- Return pointer to '\0' terminator of dst
-*/
-
-/* different names */
-struct ffblk {
- char ff_reserved[21];
- byte ff_attrib;
- unsigned ff_ftime;
- unsigned ff_fdate;
- long ff_fsize;
- char ff_name[13];
-};
-
-#endif /* WATCOMC */
-
-
-#ifdef _PAC_NOCLIB_
-char *stpcpy(char * const dst, const char * const src);
-/* Copy src onto dst, Return a pointer to the '\0' character of dst
-*/
-
-int getdisk(void);
-/* Return the current working drive. 0 == A:, 1 == B: ...
-*/
-
-int setdisk(void);
-/* Change the current working drive. 0 == A:, 1 == B: ...
- Returns the number of available drive letters (not necessary
- currently accessable).
-*/
-
-/*
- * Pacific does not offer any OS version information
- */
-unsigned osversion(void);
-/* Return: _osmajor | (_osminor << 8)
-*/
-
-/*
- * No findfirst()
- */
-struct ffblk {
- char ff_reserved[21];
- byte ff_attrib;
- unsigned ff_ftime;
- unsigned ff_fdate;
- long ff_fsize;
- char ff_name[13];
-};
-
-int findfirst(const char * const pattern, struct ffblk *ff, int attrib);
-/* Initiate file search
- Return: 0 on success
-*/
-
-int findnext(struct ffblk *ff);
-/* Next file search
- Return: 0 on success
-*/
-
-void far *getdta(void);
-/* Return current working DTA
-*/
-
-void setdta(void far *dta);
-/* Set current working DTA
-*/
-
-unsigned _psp_(void);
-/* Return the current PSP
-*/
-
-void ctrlbrk(int (*fct)(void));
-/* Set new ^Break handler
-*/
-
-#endif /* _PAC_NOCLIB_ */
-
-#ifdef COMPILE
-#undef COMPILE
-#endif
-
-#ifdef _MICROC_
-#define COMPILE
-#endif
-#ifdef _PAC_NOCLIB_
-#define COMPILE
-#endif
-#ifdef __WATCOMC__
-#define COMPILE
-#endif
-#ifdef _TC_EARLY_
-#define COMPILE
-#endif
-
-#ifdef COMPILE
-#undef COMPILE
-
-char *_getdcwd(int drive, char *buf, unsigned length);
-/* Return the fully-qualified path of drive in the format:
- ?:\...\...\...
- If buf == NULL, a buffer of length bytes is allocated.
-
- Return:
- NULL: On failure
- else: on success (buf or allocated buffer)
-*/
-#endif
-
-int getbootdisk(void);
-/* as getdisk() but returns the boot drive
- Return:
- 1 == A:, 2 == B:
- 0: failure
-*/
-
-#endif
Deleted: freecom/trunk/suppl/src/suppldbg.h
===================================================================
--- freecom/trunk/suppl/src/suppldbg.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/suppldbg.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,618 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* $RCSfile$
- $Locker$ $Name$ $State$
-
- SUPPL common debugging features
-
- If used by an application, SUPPL and the application will use the
- same debugging driver and, therefore, debugging extends from the
- application into the functions included from SUPPL. This is
- useful especially while debugging heap actions (alloc/dealloc).
-
- Note #1: If NDEBUG is defined, all debugging features are turned off!
- Note #2: This #include file MUST be included at the end of the list,
- at least behind all the standard #includes referencing via '<...>'.
- Otherwise it is possible that some redefines do not work or the
- compiler will detect errors within standard include files.
-
- Understood debugging features:
- SUPPL_DBG_MEMORY:
- Causes that the macro chkMem performs an extensive test of
- the logical memory management of DOS and the C runtime environment.
- SUPPL_DBG_HEAP:
- Causes that the macro 'chkHeap' actively checks the local
- heap for corruption.
- chkHeap includes chkMem!
- SUPPL_LOG_MEMORY:
- Causes to redefine heap-related CLib functions (malloc, calloc,
- realloc, free,& strdup).
- SUPPL_LOG_FUNCTION:
- Note: These package was inspired by Fred Fish's DBUG package
- shipped with DMake v3+.
- When the macro SUPPL_LOG_NO_INFO is #define'ed prior including
- this header file, the macro DBG_INFO() expands to nothing.
-
- Causes to active all of the DBG_* macros:
- DBG_ENTER() - logs that a function was entered
- DBG_ENTER1/DBG_ENTER2() - as DBG_ENTER, *1 -> declaration, *2 -> fct
- DBG_ARGUMENTS() - logs function arguments
- DBG_RETURN_VALUES() - logs function return values
- DBG_EXIT() - logs that a function was exited
- DBG_LEAVE() - logs that a function was exited (with parameter, no log)
- DBG_LONG_RETURN() - logs that a function was exited (with param & log)
- DBG_RETURN_?() - logs that a function was exited (with param & log)
- DBG_PRINT() - logs arbitary information
- DBG_INFO() - logs arbitary information of information class "inf"
- DBG_STRING() - logs a string in information class "inf"
- DBG_CHANGE_STATE() - changes logging status
- DBG_PUSH_STATE() - duplicates current logging status
- DBG_POP_STATE() - forget current logging status & restore previous one
- DBG_TERMINATE() - terminate application with a log message
-
-*/
-
-#ifndef __SUPPLDBG_H
-#define __SUPPLDBG_H
-
-#include <assert.h>
-#ifndef _MICROC_
-#include <stdlib.h>
-#endif
-#include <portable.h>
-
-/*
- * Initialize all macros with dummy values. They are undefined later
- * right before a debugging specific value is added.
- * Initializing them here ensures that they are correctly set for
- * non-debugging.
- */
-#define chkHeap ;
-#define chkMem ;
-
-
-#ifdef NDEBUG /* native debug support disabled? */
-
-/* Turn off every SUPPL specific debugging feature */
-#undef SUPPL_DBG_HEAP
-#undef SUPPL_DBG_MEMORY
-#undef SUPPL_LOG_MEMORY
-#undef SUPPL_LOG_FUNCTION
-
-#else
-
-#ifdef SUPPL_DBG_ALL
-
-/* Turn on every SUPPL specific debugging feature */
-#define SUPPL_DBG_HEAP
-#define SUPPL_DBG_MEMORY
-#define SUPPL_LOG_MEMORY
-#define SUPPL_LOG_FUNCTION
-
-#endif
-
-#endif /* !defined(NDEBUG) */
-
-#ifdef SUPPL_ALWAYS_DEBUG_HEAP
-#define SUPPL_DBG_HEAP
-#endif
-#ifdef SUPPL_ALWAYS_DEBUG_MEMORY
-#define SUPPL_DBG_MEMORY
-#endif
-
-#ifdef SUPPL_DBG_MEMORY
-
-#undef chkMem
-#define chkMem suppl_testMemChain();
-
-#endif
-
-
-#ifdef SUPPL_DBG_HEAP
-
-/* Define the macro 'chkHeap' to actively test the local heap for
- corruption. Note: The macro must be used without semicolon!
-*/
-#undef chkHeap
-#ifdef __TURBOC__
-#include <alloc.h>
-#ifdef NDEBUG
-#define chkHeap suppl_testHeap(); chkMem
-#else
-#define chkHeap assert(heapcheck() == _HEAPOK); chkMem
-#endif
-#else
-#define chkHeap chkMem
-#endif
-
-#endif
-
-#ifdef SUPPL_LOG_MEMORY
-#include "syslog.h"
-
-/* Use internal wrappers for CLib symbols */
-
-#ifdef malloc
-#undef malloc
-#endif
-
-#ifdef realloc
-#undef realloc
-#endif
-
-#ifdef calloc
-#undef calloc
-#endif
-
-#ifdef free
-#undef free
-#endif
-
-#ifdef strdup
-#undef strdup
-#endif
-
-#define malloc(size) suppl_malloc((size))
-#define calloc(nelem,size) suppl_calloc((nelem), (size))
-#define realloc(poi,size) suppl_realloc((poi), (size))
-#define free(poi) suppl_free((poi))
-#define strdup(poi) suppl_strdup((poi))
-
-#endif
-
-#ifdef SUPPL_LOG_FUNCTION
-
-/* The following macros are defined:
-
- DBG_EXTENSION
- Extension of the logfile
-
- DBG_LIBRARY
- If redefined by the user, this macros specifies the name
- of the library, the current file is located in.
- Defaults to none.
-
- DBG_ALWAYS_FLUSHLOG
- If defined, the log file is flushed each time one entry has been
- written successfully into the logfile. (compile-time option
- - see INITSUPL.LOC!)
-
- DBG_ALWAYS_CLOSELOG
- If defined, the log file is closed each time one entry has been
- written successfully into the logfile. (compile-time option
- - see INITSUPL.LOC!)
- Use this option if system crashes corrupt the logfile or same
- entries won't appear there.
-
- NONE OF THESE MACROS MUST NOT BE USED WITH A TRAILING SEMICOLON!
-
- DBG_CLOSELOG
- Close the logfile.
-
- DBG_FLUSHLOG
- Flush the log file and make sure all data is written to disk
- and the directory entry has been updated.
- This function should be called each time when it is possible
- that the program is going to crash or is going to be
- asynchroneously terminated (e.g. Ctrl-Alt-Del).
-
- DBG_ENTER(char *function_name, char *function_class)
- Enters the function with name "function_name" and class. (see STATE)
- It must be the first statement immediately following the variable
- declaration, because it will define a variable as well.
- This macro must be pairly used with DBG_LEAVE or DBG_EXIT.
- All of the other macros won't work without DBG_ENTER.
-
- DBG_ENTER1
- Is the variable declaration part of DBG_ENTER()
-
- DBG_ENTER2(char *function_name, char *function_class)
- Is the function calling part of DBG_ENTER()
-
- DBG_ARGUMENTS( (char *format_spec, arguments) )
- Logs the arguments of the current function. The parameters follow
- the same rules as in DBG_PRINT. The only difference to DBG_PRINT
- is that the output can be selectively enabled/disabled.
-
- DBG_RETURN_VALUES( (char *format_spec, arguments) )
- Logs the retrun values of the current function. The parameters follow
- the same rules as in DBG_PRINT. The only difference to DBG_PRINT
- is that the output can be selectively enabled/disabled.
-
- DBG_EXIT
- Exits a void function. The "return" statement is already
- included.
-
- DBG_LEAVE(return_expression)
- As DBG_EXIT, but "return_expression" is passed as an argument
- to "return". The return value is NOT logged automatically.
-
- DBG_LONG_RETURN(type, char *format_spec, return_expression)
- This macro combines: DBG_RETURN_VALUES and DBG_LEAVE.
- Unfortunately return_expression would be evaluated twice,
- therefore it is evaluated once and stored into a temporary
- variable of the specified type; 'type' must (or, at least,
- should) be of the same type as the function returns. The
- same applies to the format specification, which is passed
- to printf().
-
- DBG_RETURN_#(return_expression)
- As DBG_RETURN(), '#' is the uppercase letter usually find
- within a printf()-format specification:
- # type format_spec
- C char "%c"
- S char* "\"%s\""
- I int "%d"
- U unsigned "%u"
- X int "0x%x"
- L long "%ld"
- UL unsigned long "%lu"
- F double "%f"
- G double "%g"
- P void * "%p"
-
- A 'B' may be prefixed to buffer "return_expression" within a
- temporary variable to suppress side effects and/or multiple
- evalutation of a complex expression.
-
- DBG_PRINT( char *information_class, (char *format_spec, arguments) )
- Logs ONE line. "format_spec" is a valid printf() format
- string and should not contain no '\n' character. Both the
- format spec and the arguments must be enclosed into
- parenthises.
- The information_class specifies whether or not this information
- is logged (see STATE).
-
- DBG_INFO( (char *format_spec, arguments) )
- As DBG_PRINT(), but prints message of class "inf".
- Because these macro may generate a lot of strings, they can be
- individually disable with the SUPPL_LOG_NO_INFO macro. It must
- be #define'ed prior including "suppldbg.h"
-
- DBG_STRING(char *string)
- As DBG_INFO(), but prints a string only
-
- DBG_PUSH_STATE
- Duplicates the current logging status. Any subsequent DBG_CHANGE_STATE
- will effect the newly generated status only.
- If there is no status currently, this function is ignored.
-
- DBG_POP_STATE
- Discards the topmost logging status and restores the previous one.
- If there is only one or none pushed status, this function is
- ignored.
-
- DBG_CHANGE_STATE(char *state_spec)
- Modifies the current logging status according the state_spec.
- If there is no current status, a new one will be created.
- The state_spec is a sequence of log_specs delimited by semicolons.
- A log_spec consists of a log_format_letter and arguments,
- the arguments can be delimited by commas, if necessary.
- No superflous whitespaces or such are allowed!
-
- The following log_format_letters are understood:
-
- d# set the maximum logging depth (#: unsigned number)
- default: no limit
- f?*,... files to be logged (*: one file name), each filename
- is prefixed by '+' enable, or '-' disable file.
- Wildcards are not allowed. The filename must be specified
- the same way as the compiler named them in their __FILE__
- macro, this is usually the fully-qualified filename.
- "+" alone logs everything (clears every previous settings),
- "-" alone logs nothing (also clears every previous settings).
- default: log everything.
- c?*,... functions to be logged (*: one function name)
- Syntax the same as "f*,...", but the string must
- case-sensitively match the string passed to DBG_ENTER()
- l? globally enable/disable logging (?: + enable, - disable)
- i? indent output (?: + enable, - disable)
- If disbale the nesting level is inserted as number, otherwise
- as a repetive count of "| " strings
- C?*,... classes to be logged
- Syntax the same as "f*,...", but the string must either
- case-sensitively match one of the classes specified as
- function_class (DBG_ENTER) or information_class (DBG_PRINT)
- or one of the SUPPL classes:
- information classes:
- "arg" - DBG_ARGUMENTS
- "rv" - DBG_RETURN_VALUE
- "fct" - DBG_ENTER & DBG_EXIT/DBG_LEAVE
- "inf" - informative information
-
- function classes:
- "env" - environment
- "mcb" - MCB
- "mem" - memory
- "str" - string
- "ini" - INI file
- "cmd" - command line handling
- "err" - error wrappers
- "dfn" - filename functions
- "fil" - FILE wrappers
- "lmt" - long mathematics
- "nls" - NLS
- "log" - syslog / logging
- "msc" - misc.
-
- Note: function and information classes share the same
- name space.
- Note: If the library name is specify with DBG_LIBRARY,
- one must enable the library as well. All SUPPL files
- use the library name "SUPPL". E.g. to enable SUPPL logging,
- it is _not_ sufficient to specify "C+", but "C+,+SUPPL",
- note that "+SUPPL" must trail "+"!
- Defaults to '-' (disable everything).
-
- DBG_TERMINATE(char *string)
- logs the string, then "program terminated by debug system",
- then terminates the application via exit(DBG_EXIT_CODE)
-*/
-
-#ifndef DBG_LIBRARY
-#define DBG_LIBRARY 0
-#endif
-
-#define DBG_CLOSELOG \
- suppl_log_close();
-
-#define DBG_FLUSHLOG \
- suppl_log_flush();
-
-#define DBG_ENTER1 \
- auto suppl_log_local_data_t suppl_log_data;
-
-#define DBG_ENTER2(fct_name, fct_class) \
- suppl_log_enter(DBG_LIBRARY, __FILE__, __LINE__, &suppl_log_data \
- , (fct_name), (fct_class));
-
-#define DBG_ENTER(fct_name, fct_class) \
- DBG_ENTER1 \
- DBG_ENTER2(fct_name, fct_class)
-
-#define DBG_ARGUMENTS( info ) \
- DBG_PRINT( Suppl_class_arg , info )
-
-#define DBG_RETURN_VALUES( info ) \
- DBG_PRINT( Suppl_class_rv , info )
-
-#define DBG_EXIT \
- { suppl_log_leave(&suppl_log_data); \
- return; }
-
-#define DBG_LEAVE(expr) \
- { suppl_log_leave(&suppl_log_data); \
- return (expr); }
-
-#define DBG_LONG_RETURN(type, fmt, expr) \
- { type suppl_temp_var; \
- suppl_temp_var = (expr); \
- DBG_RETURN_VALUES( (fmt, suppl_temp_var) ) \
- DBG_LEAVE( suppl_temp_var ) \
- }
-
-#define DBG_RETURN(fmt, expr) \
- { DBG_RETURN_VALUES( (fmt, (expr)) ) \
- DBG_LEAVE( (expr) ) \
- }
-
-#if 1
-#define DBG_PRINT(inf_class, info) \
- { if(suppl_log_print_1((inf_class))) \
- suppl_log_print_2 info; \
- }
-#else
-#define DBG_PRINT(inf_class, info) \
- { if(suppl_log_class_enabled((inf_class))) \
- suppl_log_log info; \
- }
-#endif
-
-#ifdef SUPPL_LOG_NO_INFO
-#define DBG_INFO(info) ;
-#define DBG_STRING(info) ;
-#else
-#define DBG_INFO( info ) \
- DBG_PRINT( Suppl_class_inf , info )
-#define DBG_STRING(str) DBG_INFO( (str) )
-#endif
-
-#define DBG_PUSH_STATE \
- suppl_log_push();
-
-#define DBG_POP_STATE \
- suppl_log_pop();
-
-#define DBG_CHANGE_STATE(state) \
- suppl_log_change((state));
-
-#define DBG_TERMINATE(loginfo) \
- suppl_log_terminate((loginfo));
-
-#else
-
-/* Generate pseudo-macros */
-#define DBG_CLOSELOG ;
-#define DBG_FLUSHLOG ;
-#define DBG_ENTER1 ;
-#define DBG_ENTER2(fct_name, fct_class) ;
-#define DBG_ENTER(fct_name, fct_class) ;
-#define DBG_ARGUMENTS( info ) ;
-#define DBG_RETURN_VALUES( info ) ;
-#define DBG_EXIT return;
-#define DBG_LEAVE(expr) return (expr);
-#define DBG_LONG_RETURN(t,f,expr) return (expr);
-#define DBG_RETURN(f,expr) return (expr);
-#define DBG_PRINT(inf_class, info) ;
-#define DBG_INFO( info ) ;
-#define DBG_STRING(str) ;
-#define DBG_PUSH_STATE ;
-#define DBG_POP_STATE ;
-#define DBG_CHANGE_STATE(state) ;
-#define DBG_TERMINATE(string) suppl_log_exit((string));
-
-#endif
-
-/* Format specs used for the DBG_RETURN_*() macros */
-#define DBG_RETURN_FMT_SPEC_C "%c"
-#define DBG_RETURN_FMT_SPEC_S "\"%s\""
-#define DBG_RETURN_FMT_SPEC_I "%d"
-#define DBG_RETURN_FMT_SPEC_U "%u"
-#define DBG_RETURN_FMT_SPEC_X "0x%x"
-#define DBG_RETURN_FMT_SPEC_L "%ld"
-#define DBG_RETURN_FMT_SPEC_UL "%lu"
-#define DBG_RETURN_FMT_SPEC_F "%f"
-#define DBG_RETURN_FMT_SPEC_G "%g"
-#define DBG_RETURN_FMT_SPEC_P "%p"
-
-#define DBG_RETURN_BC(expr) DBG_LONG_RETURN(char, DBG_RETURN_FMT_SPEC_C, (expr))
-#define DBG_RETURN_BS(expr) DBG_LONG_RETURN(char*, DBG_RETURN_FMT_SPEC_S, (expr))
-#define DBG_RETURN_BI(expr) DBG_LONG_RETURN(int, DBG_RETURN_FMT_SPEC_I, (expr))
-#define DBG_RETURN_BU(expr) DBG_LONG_RETURN(unsigned, DBG_RETURN_FMT_SPEC_U, (expr))
-#define DBG_RETURN_BX(expr) DBG_LONG_RETURN(int, DBG_RETURN_FMT_SPEC_X, (expr))
-#define DBG_RETURN_BL(expr) DBG_LONG_RETURN(long, DBG_RETURN_FMT_SPEC_L, (expr))
-#define DBG_RETURN_BUL(expr) DBG_LONG_RETURN(unsigned long, DBG_RETURN_FMT_SPEC_UL, (expr))
-#define DBG_RETURN_BF(expr) DBG_LONG_RETURN(double, DBG_RETURN_FMT_SPEC_F, (expr))
-#define DBG_RETURN_BG(expr) DBG_LONG_RETURN(double, DBG_RETURN_FMT_SPEC_G, (expr))
-#define DBG_RETURN_BP(expr) DBG_LONG_RETURN(void *, DBG_RETURN_FMT_SPEC_P, (expr))
-
-#define DBG_RETURN_C(expr) DBG_RETURN(DBG_RETURN_FMT_SPEC_C, (expr))
-#define DBG_RETURN_S(expr) DBG_RETURN(DBG_RETURN_FMT_SPEC_S, (expr))
-#define DBG_RETURN_I(expr) DBG_RETURN(DBG_RETURN_FMT_SPEC_I, (expr))
-#define DBG_RETURN_U(expr) DBG_RETURN(DBG_RETURN_FMT_SPEC_U, (expr))
-#define DBG_RETURN_X(expr) DBG_RETURN(DBG_RETURN_FMT_SPEC_X, (expr))
-#define DBG_RETURN_L(expr) DBG_RETURN(DBG_RETURN_FMT_SPEC_L, (expr))
-#define DBG_RETURN_UL(expr) DBG_RETURN(DBG_RETURN_FMT_SPEC_UL, (expr))
-#define DBG_RETURN_F(expr) DBG_RETURN(DBG_RETURN_FMT_SPEC_F, (expr))
-#define DBG_RETURN_G(expr) DBG_RETURN(DBG_RETURN_FMT_SPEC_G, (expr))
-#define DBG_RETURN_P(expr) DBG_RETURN(DBG_RETURN_FMT_SPEC_P, (expr))
-
-/*
- * Declarations of functions
- */
-
-/* Some special log functions:
- malloc --> malloc(size) = poi; <success|failure>
- calloc --> malloc(size) = poi; <success|failure>
- realloc --> realloc(poi, size) = poi; <success|failure>
- free --> free(poi);
- strdup --> malloc(size) = poi; <success|failure>
-
- These functions will automatically open the logfile if necessary.
-*/
-extern void suppl_log_malloc(void const * const newpoi, const size_t size);
-/* extern void suppl_log_calloc(void const * const newpoi, const size_t nelem, const size_t size); */
-#define suppl_log_calloc(newpoi,nelem,size) \
- suppl_log_malloc((newpoi), (nelem) * (size))
-extern void suppl_log_realloc(void const * const newpoi, const void * const oldpoi, const size_t size);
-extern void suppl_log_free(const void * const oldpoi);
-extern void suppl_log_strdup(char const * const newpoi, const char * const string);
-
-/* These functions substitutes the associated function and
- call suppl_log_*(), too. */
-extern void *suppl_malloc(const size_t size);
-extern void *suppl_calloc(const size_t nelem, const size_t size);
-extern void *suppl_realloc(void * const poi, const size_t size);
-extern void suppl_free(void * const poi);
-extern char *suppl_strdup(const char * const string);
-
-/* Function to test if the DOS Memory Chain has been corrupted
- if so, the application is terminated */
-extern void suppl_testMemChain(void);
-extern void suppl_testHeap(void);
-
-/* These functions are the backend of the logging package */
-typedef unsigned suppl_log_lvl_t; /* nesting level type */
-typedef unsigned long suppl_log_linenr_t; /* compiler line number type */
-typedef const char * suppl_log_sptr_t; /* string pointer */
-typedef const char * const suppl_log_csptr_t; /* string pointer */
-typedef struct {
- suppl_log_lvl_t suppl_l_prv_nestlevel;
- FLAG suppl_l_prv_fct_enabled;
- suppl_log_sptr_t suppl_l_fctname;
-} suppl_log_local_data_t;
-
-void suppl_log_enter(suppl_log_sptr_t library_name
- , suppl_log_csptr_t file_name
- , suppl_log_linenr_t linenr
- , suppl_log_local_data_t *data
- , suppl_log_csptr_t function_name
- , suppl_log_csptr_t function_class);
-void suppl_log_leave(suppl_log_local_data_t *data);
-int suppl_log_class_enabled(suppl_log_csptr_t classname);
-void suppl_log_log(suppl_log_csptr_t fmt, ...);
-int suppl_log_print_1(suppl_log_csptr_t inf_class);
-void suppl_log_print_2(suppl_log_csptr_t fmt, ...);
-void suppl_log_push(void);
-void suppl_log_pop(void);
-void suppl_log_change(suppl_log_csptr_t state);
-void suppl_log_flush(void);
-void suppl_log_close(void);
-void suppl_log_terminate(suppl_log_csptr_t loginfo);
-void suppl_log_exit(suppl_log_csptr_t loginfo);
-
-
-/*
- * Strings of the function classes used within SUPPL
- * defined as constant character arrays to prevent that each file
- * creates its own local copy of the string in its data segment
- */
-extern const char Suppl_appName[];
-extern const char Suppl_cmdline[];
-extern const char Suppl_dfn[];
-extern const char Suppl_dynstr[];
-extern const char Suppl_env[];
-extern const char Suppl_error[];
-extern const char Suppl_farmem[];
-extern const char Suppl_inifile[];
-extern const char Suppl_inifile1[];
-extern const char Suppl_inifile2[];
-extern const char Suppl_inifile3[];
-extern const char Suppl_mcb[];
-extern const char Suppl_misc[];
-extern const char Suppl_nls[];
-extern const char Suppl_portable[];
-extern const char Suppl_SUPPL[];
-extern const char Suppl_supplio[];
-extern const char Suppl_syslog[];
-extern const char Suppl_usr[];
-
-/*
- * Strings of the log classes used within SUPPL
- * defined as constant character arrays to prevent that each file
- * creates its own local copy of the string in its data segment
- */
-extern const char Suppl_class_arg[];
-extern const char Suppl_class_rv[];
-extern const char Suppl_class_fct[];
-extern const char Suppl_class_inf[];
-extern const char Suppl_class_env[];
-extern const char Suppl_class_mcb[];
-extern const char Suppl_class_mem[];
-extern const char Suppl_class_str[];
-extern const char Suppl_class_ini[];
-extern const char Suppl_class_cmd[];
-extern const char Suppl_class_err[];
-extern const char Suppl_class_dfn[];
-extern const char Suppl_class_fil[];
-extern const char Suppl_class_lmt[];
-extern const char Suppl_class_nls[];
-extern const char Suppl_class_log[];
-extern const char Suppl_class_msc[];
-#endif /* defined(__DBUG_H) */
Deleted: freecom/trunk/suppl/src/supplio.h
===================================================================
--- freecom/trunk/suppl/src/supplio.h 2011-04-09 04:08:20 UTC (rev 1569)
+++ freecom/trunk/suppl/src/supplio.h 2011-04-22 14:36:09 UTC (rev 1570)
@@ -1,484 +0,0 @@
-/*
- This file is part of SUPPL - the supplemental library for DOS
- Copyright (C) 1996-2000 Steffen Kaiser
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-/* $Id$
- $Locker$ $Name$ $State$
-
- Declarations for the supplemental I/O functions.
-
- To overcome the difference between Micro-C and ANSI C:
- All identifiers starts with an uppercase 'F', the leading
- lowercase 'f' is stripped, if present.
-
- Functions that will automatically terminate the program with an
- appropriate error message if the action fails. They have an uppercase
- 'E' instead of the 'F'. The Eopen(), Ecreate() and Eclose() functions
- use the Fxopen() and Fxclose() to save the extended attributes;
- they use the filename to issue with the error messages.
-
- Three functions support the "extended attributes per file" feature:
- Fxopen(): open a file and generate & store the extended attributes
- Fxclose(): close the file and destroy the extended attributes
- Fxinfo(): retrieve the extended attributes
-
- The implementation is such that Fxopen() returns a normal (FILE*),
- in order to be passed to the normal F*() functions, but also sets
- up an association between the (FILE*) pointer and the extended
- attributes.
-
- If the macro SUPPL_USE_EXTENDED_ATTRIBUTES is defined prior
- #include'ing this header file, Fxopen() and Fxclose() replace
- Fopen() and Fclose() by default.
-
-*/
-
-#ifndef __SUPPLIO_H
-#define __SUPPLIO_H
-
-#include <stdio.h>
-#include <supl_def.h>
-#ifndef __PORTABLE_H
-#include <portable.h>
-#endif
-
-#ifdef _PAC_NOCLIB_
-/*
- * Missing fpos_t and assoc. functions
- */
-
-typedef long fpos_t;
-
-//int fsetpos(FILE * const fp, const fpos_t * const pos);
-#define fsetpos(stream,position) fseek((stream), *(position), 0)
-int fgetpos(FILE * const fp, fpos_t * const pos);
-/* fsetpos() is similar to fseek() and fgetpos() to ftell(), though,
- better portabel. Both return 0 (zero) on success.
-*/
-#endif
-
-/*
- * Macros passed into Fsetmode()
- */
-#define FF_RD 1 /* read access */
-#define FF_WR 2 /* write access */
-#define FF_RW 3 /* read & write access */
-
-/*
- * Replacement of stdio functions
- * All of these macros evaluate all parameter exactly once.
- */
-#define Fflush fflush
-#define Fyclose fclose
-#define Frewind rewind
-#define Fgetc(fp) getc((fp))
-#define Fputc(c,fp) putc((c),(fp))
-#define Ffgetc(fp) fgetc((fp))
-#define Ffputc(c,fp) fputc((c),(fp))
-#define Fgets fgets
-#define Fputs fputs
-#define Ferror ferror
-#define Fclearerr clearerr
-#ifndef _MICROC_
-#define Fget(buf,size,fp) fread((buf), 1, (size), (fp))
-#define Fput(buf,size,fp) fwrite((buf), 1, (size), (fp))
-#define Fgetpos(fp,pos) fgetpos((fp), (pos))
-#define Fsetpos(fp,pos) fsetpos((fp), (pos))
-#define Fsetmode(fp,mode) // overcome Micro-C bug with R&W files
-#define Fseeki(fp,ofs) fseek((fp), (long)(ofs), SEEK_CUR)
-#define Fseekc(fp,pos) Fseeki((fp), (ofs))
-#define Fpseekc(fp,pos) Fseeki((fp), *(ofs))
-#define Fseeke(fp) fseek((fp), (long)0, SEEK_END)
-#define Fyopen fopen
-#define Fseek(fp,pos,whence) fseek((fp), (long)(pos), (whence))
-#define Fpseek(fp,pos,whence) Fseek((fp), *(pos), (whence))
-#define Fileno(fp) fileno((fp))
-#define Fdopen fdopen
-#define Feof feof
-#else
-#include <file.h>
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-#endif
-#define fpos_t dword
-#define Fput fput
-#define Fget fget
-void Fsetmode(FILE *fp, int mode);
-int Fgetpos(FILE *fp, fpos_t *pos);
-#define Fsetpos(fp,pos) Fseek((fp), (pos), SEEK_SET)
-int Fseeki(FILE *fp, int ofs);
-#define Fseekc(fp,pos) Fseek((fp), (pos), SEEK_CUR)
-#define Fpseekc(fp,pos) Fseekc((fp),(pos))
-#define Fseeke(fp) fseek((fp), 0, 0, SEEK_END)
-FILE *Fyopen(char *fnam, char *mode);
-FILE *Fdopen(int fd, char *mode);
-int Fseek(FILE *fp, dword *pos, int whence);
-#define Fpseek Fseek
-#define Fileno(fp) (fp)->FILE_handle
-int Feof(FILE *fp);
-#endif
-#define FFgetpos(fp,pos) Fgetpos((fp), aS(pos))
-#define FFsetpos(fp,pos) Fsetpos((fp), aS(pos))
-
-/* Read/write a buffer to the file.
- * Is a function in order to evaluate all parameters only once.
- * Return:
- * 0: on success
- */
-int FFget(void * const buf, size_t len, FILE *f);
-int FFput(const void * const buf, size_t len, FILE *f);
-
-/*
- * Commit a file
- *
- * Flushes the buffers cached by the C library, and
- * Flushes the buffers cached by the system and also makes sure
- * that the directory structure is updated.
- */
-#define Fcommit fcommit
-int fcommit(FILE *fp);
-int commit(int fd);
-
-/* Read a line into dynamical memory.
- *
- * There is always an '\n' (newline) character at the end of the line,
- * even at the end of file without one.
- *
- * Return:
- * NULL: on failure (out of memory)
- * else: pointer to malloc()'ed buffer, must be free()'ed by the user
- * if the returned buffer is a pointer to "", EOF or a read
- * error was encountered.
- * Note: The "" must also be free()'ed.
- */
-char *Fgetline(FILE * const f);
-
-
-FILE *Ftmpfile(void);
-/* Create and open a temporary file in binary mode
-
- Should be closed by Fxclose() in order to remove the file.
-
- Return:
- NULL: on failure (e.g. malloc() failed, no writeble directory found)
- else: opened FILE* pointer to be closed with Fxclose()
-*/
-
-FILE *F_tmpfile(const char * const fnam);
-/* Create and open a temporary file in binary mode
-
- Should be closed by Fxclose() in order to remove the file.
-
- Return:
- NULL: on failure (e.g. malloc() failed, or fnam == NULL)
- removes external file 'fnam' if it exists
- else: opened FILE* pointer to be closed with Fxclose()
-*/
-
-char *Ftmpnam(const char * const ext);
-/* Create a temporary filename, create it as a zero-length file and
- return its name.
-
- The name is overwritten the next time Ftmpnam(), Ftmpdir(),
- Etmpnam() or Etmpdir() is called.
-
- Return:
- NULL: on failure, e.g. malloc() failed, no writeble directory found
-*/
-
-char *Ftmpdir(void);
-/* Return the current writeble temporary directory with a trailing
- backslash.
-
- The user must free() the returned string manually.
- This function overwrites the string returned by Ftmpnam() or
- Etmpnam().
-
- Return:
- NULL: on failure, e.g. malloc() failed, no directory found
- else: pointer to pathname
-*/
-
-//void Fposcpy(fpos_t * const dst, const fpos_t * const src);
-#ifdef _MICROC_
-#define Fposcpy(dst,src) longcpy(dst, src)
-#else
-#define Fposcpy(dst,src) memcpy((dst), (src), sizeof(fpos_t))
-#endif
-/* Copy the value of one position to another location
-*/
-
- /* if debug enabled --> use the function and provide the test
- if fpos_t==long */
-int Fposcmp(const fpos_t * const pos1, const fpos_t * const pos2);
-
-#ifdef NDEBUG
-#define Fposcmp(pos1,pos2) \
- longcmp1(nM(*(unsigned long*))pos1, nM(*(unsigned long*))pos2)
-#endif
-/* Compare both positions
- Return:
- <0: if pos1 < pos2
- =0: if pos1 = pos2
- >0: if pos1 > pos2
-*/
-
-// void Fppos2dword(const fpos_t const *fpos, dword * const longPosp)
-#ifdef _MICROC_
-#define Fpos2dword(fpos,longPos) Fposcpy(fpos, longPos)
-#define Fppos2dword(fpos,longPos) Fposcpy(fpos, longPos)
-#else
-#define Fpos2dword(fpos,longPos) (longPos) = (dword)(fpos);
-#define Fppos2dword(fpos,longPos) *(longPos) = (dword)(fpos);
-#endif
-/* Extract the file position from a (fpos_t) type
-
- Note: There is _NO_ reverse function.
-
- Also note: (fpos_t) is known to contain more than just the
- file position, when special text handling code is enabled, such
- as multi-byte characters.
-*/
-
-int Fmaxbuf(byte ** const buf, size_t * const len);
-/* Allocate are rather large amount of memory, usually a power of 2
- Return: 0 on success
- */
-
-int Fcopyto(FILE * const fdst, FILE * const fsrc, const fpos_t * const pos);
-/* Copy (a part of) a file to another.
- Both files must be already opened with the proper permissions and
- file modes (e.g. both either binary or text, fdst has write permission,
- fsrc has read permission).
- Any bytes from fsrc are copied to fdst upto, but excluding to the
- position 'pos'.
- If the soruce file is in text mode, it is possible that 'pos' points
- to an invalid file position. In this case the behaviour is undefined.
-
- Return:
- 0: OK
- else: on failure
-*/
-
-int Fcopy(FILE * const fdst, FILE * const fsrc);
-/* Copy any byte from fsrc into fdst
- Return: 0 on success
-*/
-
-int Fcopyi(FILE * const fdst, FILE * const fsrc, size_t len);
-/* Copy len byte from fsrc into fdst
- Return: 0 on success
-*/
-
-int Fcopyl(FILE * const fdst, FILE * const fsrc, dword iM(*) len);
-/* Copy len byte from fsrc into fdst
- Return: 0 on success
-*/
-
-int Fcopybuf(FILE * const fdst, FILE * const fsrc, byte * const buf
- , const size_t len, size_t * const num);
-/* Copies one block from one stream into another one.
- Return: 0 on success
-*/
-
-/*
- * Replace for the F*() functions to automatically terminate the
- * program if the action fails.
- *
- * If the FILE* pointer is associated with an extended attribute,
- * the message contains the name of the file.
- */
-
-FILE *Eopen(const char * const fnam, const char * const mode);
-/* Open file as Fopen(), on failure return: "Cannot open file"
-*/
-
-FILE *Ecreate(const char * const fnam, const char * const mode);
-/* Open file as Fopen(), on failure return: "Cannot create file"
-*/
-
-void Eclose(FILE *f);
-/* Close the file and free all allocated resources. If the error flag
- is true, the program terminates with: "Error to access file"
-*/
-
-#define Erewind Frewind
-#define Egetc Fgetc
-#define Efgetc Ffgetc
-#define Efputc Ffputc
-#define Eputc Fputc
-#define Esetmode Fsetmode
-#define Efileno Fileno
-/* Definitions that don't generate error states or, if they would be
- checked, it could be drastically performance drop */
-
-
-char *Egets(char * const str, size_t size, FILE * const fp);
-/* Inputs a line from the stream; on failure the program
- is terminated with: "Cannot read from file"
- Return: NULL: if EOF
- else: str
-*/
-
-char *Eputs(const char * const str, FILE * const fp);
-/* Outputs a line into the stream; on failure the program
- is terminated with: "Cannot write into file"
- Return: str
-*/
-
-void *Eget(void * const buf, size_t size, FILE * const fp);
-/* Read size bytes from the stream into the buffer; on failure
- terminate the program with: "Cannot read from file"
- Return: buf
-*/
-
-void Eput(const void * const buf, size_t size, FILE * const fp);
-/* Write size bytes from the buffer into the stream; on failure
- terminate the program with: "Cannot write into file"
-*/
-
-#define EEgetpos(fp,pos) Egetpos((fp), aS(pos))
-void Egetpos(FILE * const fp, fpos_t * const pos);
-/* Retreive the file position from the stream; on failure terminate
- the program with: "Cannot access file"
-*/
-
-#define EEsetpos(fp,pos) Esetpos((fp), aS(pos))
-void Esetpos(FILE * const fp, const fpos_t * const pos);
-/* Seek to the position saved in *pos; on failure terminate the
- program with: "Cannot access file"
-*/
-
-#define Eclearerr Fclearerr
-void Eerror(const FILE * const fp);
-/* Terminate the program with "Cannot access file" if the ferror()
- statue is true.
-*/
-
-void Ereaderr(const FILE * const fp);
-void Ewriteerr(const FILE * const fp);
-/* Terminate the program with "Cannot read from file" or "Cannot
- write to file" if the ferror() status is true
-*/
-
-#ifndef _MICROC_
-#define Eseeki(fp,ofs) Eseek((fp), (long)(ofs), SEEK_CUR)
-#define Eseekc(fp,pos) Eseeki((fp), (ofs))
-#define Epseekc(fp,pos) Eseeki((fp), *(ofs))
-#define Eseeke(fp) Eseek((fp), (long)0, SEEK_END)
-#define Epseek(fp,pos,whence) Eseek((fp), *(pos), (whence))
-void Eseek(FILE * const fp, dword pos, int whence);
-#else
-#define Eseeki(fp,ofs) Efseek((fp), (ofs), SEEK_CUR)
-#define Eseeke(fp) Efseek((fp), 0, SEEK_END)
-void Efseek(FILE *fp, int pos, int whence);
-#define Eseekc(fp,pos) Eseek((fp), (ofs), SEEK_CUR)
-#define Epseekc(fp,pos) Eseek((fp), (ofs), SEEK_CUR)
-#define Epseek Eseek
-void Eseek(FILE * fp, dword *pos, int whence);
-#endif
-/* On failure terminate with: "Cannot access file"
-*/
-
-/* Read a line into dynamical memory.
- *
- * On error, an appropriate message is issued and the program
- * is terminated.
- *
- * There is always an '\n' (newline) character at the end of the line,
- * even at the end of file without one.
- *
- * Return:
- * NULL: EOF (or read error)
- * else: pointer to malloc()'ed buffer, must be free()'ed by the user
- */
-char *Egetline(FILE * const f);
-
-FILE *Etmpfile(void);
-/* Create and open a binary temporary file. On failure the program
- is terminated with: Cannot create temporary file
- The file is create with mode "w+b"
-*/
-
-char *Etmpnam(const char * const ext);
-/* Create a temporary filename with the extension ext. On failure
- terminate the program.
-
@@ Diff output truncated at 100000 characters. @@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|