home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
d
/
dshar116.zip
/
COMMON.H
next >
Wrap
C/C++ Source or Header
|
1993-03-11
|
2KB
|
68 lines
/* common.h dshar Ver1.16 nide@nara-wu.ac.jp */
#ifndef TOSJIS_def /* for UNIX only */
# define TOSJIS_def "nkf -s"
#endif
/* please include ctype.h before this file */
#define is_upper(c) (isascii(c) && isupper(c))
#define is_alpha(c) (isascii(c) && isalpha(c))
#define is_space(c) (isascii(c) && isspace(c))
#define is_digit(c) (isascii(c) && isdigit(c))
#ifndef iskanji
# define iskanji(c) \
(0x81 <= (unsigned)(c) && (unsigned)(c) <= 0x9f || \
0xe0 <= (unsigned)(c) && (unsigned)(c) <= 0xfc)
#endif
#ifdef UNIX
# define isdelim(c) ((c) == '/')
# define isdrvmk(c) 0
# define DELIM "/"
#else
# define isdelim(c) ((c) == '\\' || (c) == '/')
# define isdrvmk(c) ((c) == ':')
# define DELIM "\\"
#endif
#define isDelim(c) (isdelim(c) || isdrvmk(c))
#ifndef max
# define max(a, b) ((a) < (b) ? (b) : (a))
#endif
#define dosname(s) nameconv((s), 1)
#define unixname(s) nameconv((s), 0)
extern char *malloc(), *calloc(), *realloc();
extern char *getenv();
extern char *strcpy(), *strncpy();
extern int errno;
#ifdef UNIX
# define dstatic
#else
# define dstatic static
#endif
#ifndef SETARGS_MAIN
# define public extern
#else
# define public
#endif
public char *nameconv(), *emalloc();
public void setargs();
#ifdef UNIX
public FILE *piperdopen();
#endif
#if defined(MSC4) || defined(__TURBOC__)
struct find_t {
char reserved[21], attrib;
short wr_time, wr_date;
long size;
char name[13]; /* total 43bytes */
};
#endif
#define DTASIZE 128
#define execrdopen(cmd, av) piperdopen((cmd), (av), NULL)