Refactoring!

This commit is contained in:
Ianos Gnatiuc
2006-05-06 09:13:21 +00:00
parent 7a646ca788
commit 1cb9ab528b
9 changed files with 171 additions and 288 deletions

View File

@@ -16,46 +16,31 @@
#ifndef __FPTOOLS_H__
#define __FPTOOLS_H__
#ifndef _ANSI_ARGS_
#ifdef PROTOTYPES
#define _ANSI_ARGS_(c) c
#else
#define _ANSI_ARGS_(c) ()
#endif
#endif
#ifndef TOOLEXPORT
#define TOOLEXPORT
#endif
#ifdef __cplusplus
extern "C" {
#endif
void TOOLEXPORT _FP_free _ANSI_ARGS_((void *));
char * TOOLEXPORT _FP_strdup _ANSI_ARGS_((char *));
char * TOOLEXPORT _FP_strncpy _ANSI_ARGS_((char *, char *, int));
void * TOOLEXPORT _FP_memdup _ANSI_ARGS_((void *, int));
int TOOLEXPORT _FP_stricmp _ANSI_ARGS_((char *, char *));
int TOOLEXPORT _FP_strnicmp _ANSI_ARGS_((char *, char *, int));
char * TOOLEXPORT _FP_strrstr _ANSI_ARGS_((char *, char *));
char * TOOLEXPORT _FP_stoupper _ANSI_ARGS_((char *));
char * TOOLEXPORT _FP_stolower _ANSI_ARGS_((char *));
int TOOLEXPORT _FP_strmatch _ANSI_ARGS_((char *, char *));
char * TOOLEXPORT _FP_strstr _ANSI_ARGS_((char *, char *));
char * TOOLEXPORT _FP_stristr _ANSI_ARGS_((char *, char *));
char * TOOLEXPORT _FP_strirstr _ANSI_ARGS_((char *, char *));
char * TOOLEXPORT _FP_strrchr _ANSI_ARGS_((char *, int));
char * TOOLEXPORT _FP_fgets _ANSI_ARGS_((char *, int, FILE *));
char * TOOLEXPORT _FP_strpbrk _ANSI_ARGS_((char *, char *));
char * TOOLEXPORT _FP_strtok _ANSI_ARGS_((char *, char *));
char * TOOLEXPORT _FP_cutdir _ANSI_ARGS_((char *));
void TOOLEXPORT _FP_free (void *);
char * TOOLEXPORT _FP_strdup (char *);
char * TOOLEXPORT _FP_strncpy (char *, char *, int);
void * TOOLEXPORT _FP_memdup (void *, int);
int TOOLEXPORT _FP_stricmp (char *, char *);
int TOOLEXPORT _FP_strnicmp(char *, char *, int);
char * TOOLEXPORT _FP_strrstr (char *, char *);
char * TOOLEXPORT _FP_stoupper(char *);
char * TOOLEXPORT _FP_stolower(char *);
int TOOLEXPORT _FP_strmatch(char *, char *);
char * TOOLEXPORT _FP_strstr (char *, char *);
char * TOOLEXPORT _FP_stristr (char *, char *);
char * TOOLEXPORT _FP_strirstr(char *, char *);
char * TOOLEXPORT _FP_strrchr (char *, int);
char * TOOLEXPORT _FP_fgets (char *, int, FILE *);
char * TOOLEXPORT _FP_strpbrk (char *, char *);
char * TOOLEXPORT _FP_strtok (char *, char *);
char * TOOLEXPORT _FP_cutdir (char *);
#if 0
char * TOOLEXPORT _FP_strerror _ANSI_ARGS_((int));
char * TOOLEXPORT _FP_tempnam _ANSI_ARGS_((char *, char *));
char * TOOLEXPORT _FP_strerror(int);
char * TOOLEXPORT _FP_tempnam (char *, char *);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -24,14 +24,6 @@
* $Id$
*/
#ifndef _ANSI_ARGS_
#ifdef PROTOTYPES
#define _ANSI_ARGS_(c) c
#else
#define _ANSI_ARGS_(c) ()
#endif
#endif
/*
* Message Types
*/
@@ -182,81 +174,40 @@ typedef struct {
#define UUEXPORT
#endif
#ifdef __cplusplus
extern "C" {
#endif
int UUEXPORT UUInitialize _ANSI_ARGS_((void));
int UUEXPORT UUGetOption _ANSI_ARGS_((int, int *, char *, int));
int UUEXPORT UUSetOption _ANSI_ARGS_((int, int, char *));
char * UUEXPORT UUstrerror _ANSI_ARGS_((int));
int UUEXPORT UUSetMsgCallback _ANSI_ARGS_((void *,
void (*) (void *,
char *,
int)));
int UUEXPORT UUSetBusyCallback _ANSI_ARGS_((void *,
int (*) (void *,
uuprogress *),
long));
int UUEXPORT UUSetFileCallback _ANSI_ARGS_((void *,
int (*) (void *, char *,
char *, int)));
int UUEXPORT UUSetFNameFilter _ANSI_ARGS_((void *,
char * (*) (void *,
char *)));
char * UUEXPORT UUFNameFilter _ANSI_ARGS_((char *));
int UUEXPORT UULoadFile _ANSI_ARGS_((char *, char *, int));
uulist *UUEXPORT UUGetFileListItem _ANSI_ARGS_((int));
int UUEXPORT UURenameFile _ANSI_ARGS_((uulist *, char *));
int UUEXPORT UUDecodeToTemp _ANSI_ARGS_((uulist *));
int UUEXPORT UURemoveTemp _ANSI_ARGS_((uulist *));
int UUEXPORT UUDecodeFile _ANSI_ARGS_((uulist *, char *));
int UUEXPORT UUInfoFile _ANSI_ARGS_((uulist *, void *,
int (*) (void *,
char *)));
int UUEXPORT UUSmerge _ANSI_ARGS_((int));
int UUEXPORT UUCleanUp _ANSI_ARGS_((void));
int UUEXPORT UUQuickDecode _ANSI_ARGS_((FILE *, FILE *,
char *, long));
int UUEXPORT UUEncodeMulti _ANSI_ARGS_((FILE *, FILE *,
char *, int,
char *, char *, int));
int UUEXPORT UUEncodePartial _ANSI_ARGS_((FILE *, FILE *,
char *, int,
char *, char *,
int, int, long,
unsigned long*));
int UUEXPORT UUEncodeToStream _ANSI_ARGS_((FILE *, FILE *,
char *, int,
char *, int));
int UUEXPORT UUEncodeToFile _ANSI_ARGS_((FILE *, char *, int,
char *, char *, long));
int UUEXPORT UUE_PrepSingle _ANSI_ARGS_((FILE *, FILE *,
char *, int,
char *, int,
char *, char *,
char *, int));
int UUEXPORT UUE_PrepPartial _ANSI_ARGS_((FILE *, FILE *,
char *, int,
char *, int,
int, long, long, char *,
char *, char *, int));
int UUEXPORT UUE_PrepSingleExt _ANSI_ARGS_((FILE *, FILE *,
char *, int,
char *, int,
char *, char *,
char *, char *,
int));
int UUEXPORT UUE_PrepPartialExt _ANSI_ARGS_((FILE *, FILE *,
char *, int,
char *, int,
int, long, long, char *,
char *, char *, char *,
int));
#ifdef __cplusplus
}
#endif
int UUEXPORT UUInitialize (void);
int UUEXPORT UUGetOption (int, int *, char *, int);
int UUEXPORT UUSetOption (int, int, char *);
char * UUEXPORT UUstrerror (int);
int UUEXPORT UUSetMsgCallback (void *, void (*) (void *, char *, int));
int UUEXPORT UUSetBusyCallback (void *, int (*) (void *, uuprogress *), long);
int UUEXPORT UUSetFileCallback (void *, int (*) (void *, char *, char *, int));
int UUEXPORT UUSetFNameFilter (void *, char * (*) (void *, char *));
char * UUEXPORT UUFNameFilter (char *);
int UUEXPORT UULoadFile (char *, char *, int);
uulist *UUEXPORT UUGetFileListItem(int);
int UUEXPORT UURenameFile (uulist *, char *);
int UUEXPORT UUDecodeToTemp (uulist *);
int UUEXPORT UURemoveTemp (uulist *);
int UUEXPORT UUDecodeFile (uulist *, char *);
int UUEXPORT UUInfoFile (uulist *, void *, int (*) (void *, char *));
int UUEXPORT UUSmerge (int);
int UUEXPORT UUCleanUp (void);
int UUEXPORT UUQuickDecode (FILE *, FILE *, char *, long);
int UUEXPORT UUEncodeMulti (FILE *, FILE *, char *, int,
char *, char *, int);
int UUEXPORT UUEncodePartial (FILE *, FILE *, char *, int, char *,
char *, int, int, long, unsigned long*);
int UUEXPORT UUEncodeToStream (FILE *, FILE *, char *, int, char *, int);
int UUEXPORT UUEncodeToFile (FILE *, char *, int, char *, char *, long);
int UUEXPORT UUE_PrepSingle (FILE *, FILE *, char *, int, char *, int,
char *, char *, char *, int);
int UUEXPORT UUE_PrepPartial (FILE *, FILE *, char *, int, char *, int,
int, long, long, char *, char *, char *, int);
int UUEXPORT UUE_PrepSingleExt (FILE *, FILE *, char *, int, char *, int,
char *, char *, char *, char *, int);
int UUEXPORT UUE_PrepPartialExt (FILE *, FILE *, char *, int, char *, int,
int, long, long, char *, char *, char *,
char *, int);
#endif

View File

@@ -25,14 +25,6 @@
* $Id$
*/
#ifndef _ANSI_ARGS_
#ifdef PROTOTYPES
#define _ANSI_ARGS_(c) c
#else
#define _ANSI_ARGS_(c) ()
#endif
#endif
/*
* Busy Polls will be made after processing ... lines
*/
@@ -260,14 +252,10 @@ extern char *uunconc_UUxlat, *uunconc_UUxlen;
extern char *uunconc_B64xlat, *uunconc_XXxlat;
extern char *uunconc_BHxlat, *uunconc_save;
#ifdef __cplusplus
extern "C" {
#endif
extern void (*uu_MsgCallback) _ANSI_ARGS_((void *, char *, int));
extern int (*uu_BusyCallback) _ANSI_ARGS_((void *, uuprogress *));
extern int (*uu_FileCallback) _ANSI_ARGS_((void *, char *, char *, int));
extern char * (*uu_FNameFilter) _ANSI_ARGS_((void *, char *));
extern void (*uu_MsgCallback) (void *, char *, int);
extern int (*uu_BusyCallback) (void *, uuprogress *);
extern int (*uu_FileCallback) (void *, char *, char *, int);
extern char * (*uu_FNameFilter) (void *, char *);
/*
* Functions from uulib.c that aren't defined in <uudeview.h>
@@ -275,66 +263,57 @@ extern char * (*uu_FNameFilter) _ANSI_ARGS_((void *, char *));
*/
#if defined(STDC_HEADERS) || defined(HAVE_STDARG_H)
int UUMessage _ANSI_ARGS_((char *, int,
int, char *, ...));
int UUMessage (char *, int, int, char *, ...);
#else
int UUMessage ();
#endif
int UUBusyPoll _ANSI_ARGS_((void));
int UUBusyPoll (void);
/*
* Functions from uucheck.c
*/
uufile * UUPreProcessPart _ANSI_ARGS_((fileread *, int *));
int UUInsertPartToList _ANSI_ARGS_((uufile *));
uulist * UUCheckGlobalList _ANSI_ARGS_((void));
uufile * UUPreProcessPart (fileread *, int *);
int UUInsertPartToList (uufile *);
uulist * UUCheckGlobalList (void);
/*
* Functions from uuutil.c
*/
void UUkillfread _ANSI_ARGS_((fileread *));
void UUkillfile _ANSI_ARGS_((uufile *));
void UUkilllist _ANSI_ARGS_((uulist *));
void UUkillheaders _ANSI_ARGS_((headers *));
void UUkillfread (fileread *);
void UUkillfile (uufile *);
void UUkilllist (uulist *);
void UUkillheaders (headers *);
fileread * ScanPart _ANSI_ARGS_((FILE *, char *, int *));
int UUbhdecomp _ANSI_ARGS_((char *, char *,
char *, int *,
size_t, size_t,
size_t *));
size_t UUbhwrite _ANSI_ARGS_((char *, size_t, size_t,
FILE *));
fileread * ScanPart (FILE *, char *, int *);
int UUbhdecomp (char *, char *, char *, int *,
size_t, size_t, size_t *);
size_t UUbhwrite (char *, size_t, size_t, FILE *);
/*
* Functions from uunconc.c
*/
int UURepairData _ANSI_ARGS_((FILE *, char *,
int, int *));
int UURepairData (FILE *, char *, int, int *);
void UUInitConc _ANSI_ARGS_((void));
int UUValidData _ANSI_ARGS_((char *, int, int *));
size_t UUDecodeLine _ANSI_ARGS_((char *, char *, int));
int UUDecodePart _ANSI_ARGS_((FILE *, FILE *, int *,
long, int, int, char *));
int UUDecode _ANSI_ARGS_((uulist *));
void UUInitConc (void);
int UUValidData (char *, int, int *);
size_t UUDecodeLine (char *, char *, int);
int UUDecodePart (FILE *, FILE *, int *, long, int, int, char *);
int UUDecode (uulist *);
/*
* Message retrieval from uustring.c
*/
char * uustring _ANSI_ARGS_((int));
char * uustring (int);
/*
* From uuscan.c
*/
int UUScanHeader _ANSI_ARGS_((FILE *, headers *));
int UUScanHeader (FILE *, headers *);
#ifdef __cplusplus
}
#endif
#endif