extern void oops();
int
-main(argc, argv)
-char **argv;
+main(int argc, char **argv)
{
int n;
char *p;
return 0;
}
-sdump(pagf)
-int pagf;
+void
+sdump(int pagf)
{
register b;
register n = 0;
oops("read failed: block %d", n);
}
-pagestat(pag)
-char *pag;
+int
+pagestat(char *pag)
{
register n;
register free;
#define empty(page) (((short *) page)[0] == 0)
int
-main(argc, argv)
-char **argv;
+main(int argc, char **argv)
{
int n;
char *p;
return 0;
}
-sdump(pagf)
-int pagf;
+void
+sdump(int pagf)
{
register r;
register n = 0;
#ifdef OLD
-dispage(pag)
-char *pag;
+int
+dispage(char *pag)
{
register i, n;
register off;
}
}
#else
-dispage(pag)
-char *pag;
+void
+dispage(char *pag)
{
register i, n;
register off;
#endif
char
-getopt(argc, argv, optstring)
-int argc;
-char **argv;
-char *optstring;
+getopt(int argc, char **argv, char *optstring)
{
register int c;
register char *place;
void
-print_datum(db)
-datum db;
+print_datum(datum db)
{
int i;
datum
-read_datum(s)
-char *s;
+read_datum(char *s)
{
datum db;
char *p;
char *
-key2s(db)
-datum db;
+key2s(datum db)
{
char *buf;
char *p1, *p2;
return buf;
}
-
-main(argc, argv)
-int argc;
-char **argv;
+int
+main(int argc, char **argv)
{
typedef enum {
YOW, FETCH, STORE, DELETE, SCAN, REGEXP
static char no_db[] = "dbm: no open database\n";
-dbminit(file)
- char *file;
+int
+dbminit(char *file)
{
if (cur_db != NODB)
dbm_close(cur_db);
}
long
-forder(key)
-datum key;
+forder(datum key)
{
if (cur_db == NODB) {
printf(no_db);
}
datum
-fetch(key)
-datum key;
+fetch(datum key)
{
datum item;
return (dbm_fetch(cur_db, key));
}
-delete(key)
-datum key;
+int
+delete(datum key)
{
if (cur_db == NODB) {
printf(no_db);
return (dbm_delete(cur_db, key));
}
-store(key, dat)
-datum key, dat;
+int
+store(datum key, datum dat)
{
if (cur_db == NODB) {
printf(no_db);
}
datum
-firstkey()
+firstkey(void)
{
datum item;
}
datum
-nextkey(key)
-datum key;
+nextkey(datum key)
{
datum item;
static void badk(), doit(), prdatum();
int
-main(argc, argv)
-int argc;
-char *argv[];
+main(int argc, char **argv)
{
int c;
register cmd *act;
}
static void
-doit(act, file)
-register cmd *act;
-char *file;
+doit(register cmd *act, char *file)
{
datum key;
datum val;
}
static void
-badk(word)
-char *word;
+badk(char *word)
{
register int i;
}
static cmd *
-parse(str)
-register char *str;
+parse(register char *str)
{
register int i = CTABSIZ;
register cmd *p;
}
static void
-prdatum(stream, d)
-FILE *stream;
-datum d;
+prdatum(FILE *stream, datum d)
{
register int c;
register char *p = d.dptr;
#if 0
static char *
-printW(sv)
-SV * sv ;
+printW(SV *sv)
{
#if 1
return "" ;
#ifdef DEBUG_CLOSURES
STATIC void
-cv_dump(cv)
-CV* cv;
+cv_dump(CV *cv)
{
CV *outside = CvOUTSIDE(cv);
AV* padlist = CvPADLIST(cv);
#ifdef PERL_OBJECT
qsortsv(SV ** array, size_t num_elts, SVCOMPARE compare)
#else
-qsortsv(
- SV ** array,
- size_t num_elts,
- I32 (*compare)(SV *a, SV *b))
+qsortsv(SV ** array, size_t num_elts, I32 (*compare)(SV *a, SV *b))
#endif
{
register SV * temp;
|| defined(HAS_SETREGID) || defined(HAS_SETRESGID))
/* The Hard Way. */
STATIC int
-emulate_eaccess (const char* path, int mode) {
+emulate_eaccess (const char* path, int mode)
+{
Uid_t ruid = getuid();
Uid_t euid = geteuid();
Gid_t rgid = getgid();
#if !defined(PERL_EFF_ACCESS_R_OK)
STATIC int
-emulate_eaccess (const char* path, int mode) {
+emulate_eaccess (const char* path, int mode)
+{
croak("switching effective uid is not implemented");
/*NOTREACHED*/
return -1;
}
#if !defined(HAS_MKDIR) || !defined(HAS_RMDIR)
-static int
-dooneliner(cmd, filename)
-char *cmd;
-char *filename;
+STATIC int
+dooneliner(char *cmd, char *filename)
{
char *save_filename = filename;
char *cmdline;
# define F_TEST 3 /* Test a region for other processes locks */
# endif
-static int
-lockf_emulate_flock (fd, operation)
-int fd;
-int operation;
+STATIC int
+lockf_emulate_flock (int fd, int operation)
{
int i;
int save_errno;
#define REG_ADD(sv) REG_REPLACE(sv,Nullsv,sv)
#define REG_REMOVE(sv) REG_REPLACE(sv,sv,Nullsv)
-static void
-reg_add(sv)
-SV* sv;
+STATIC void
+reg_add(SV *sv)
{
if (PL_sv_count >= (registry_size >> 1))
{
++PL_sv_count;
}
-static void
-reg_remove(sv)
-SV* sv;
+STATIC void
+reg_remove(SV *sv)
{
REG_REMOVE(sv);
--PL_sv_count;
}
-static void
-visit(f)
-SVFUNC f;
+STATIC void
+visit(SVFUNC f)
{
I32 i;
}
void
-sv_add_arena(ptr, size, flags)
-char* ptr;
-U32 size;
-U32 flags;
+sv_add_arena(char *ptr, U32 size, U32 flags)
{
if (!(flags & SVf_FAKE))
Safefree(ptr);
}
STATIC void
-check_uni(void) {
+check_uni(void)
+{
char *s;
char ch;
char *t;
#ifdef UNLINK_ALL_VERSIONS
I32
-unlnk(f) /* unlink all versions of a file */
-char *f;
+unlnk(char *f) /* unlink all versions of a file */
{
I32 i;
#define HTOV(name,type) \
type \
- name (n) \
- register type n; \
+ name (register type n) \
{ \
union { \
type value; \
#define VTOH(name,type) \
type \
- name (n) \
- register type n; \
+ name (register type n) \
{ \
union { \
type value; \
#ifndef HAS_DUP2
int
-dup2(oldfd,newfd)
-int oldfd;
-int newfd;
+dup2(int oldfd, int newfd)
{
#if defined(HAS_FCNTL) && defined(F_DUPFD)
if (oldfd == newfd)
#ifdef HAS_FORK
int /* Cannot prototype with I32
in os2ish.h. */
-my_syspclose(ptr)
+my_syspclose(PerlIO *ptr)
#else
I32
-my_pclose(ptr)
+my_pclose(PerlIO *ptr)
#endif
-PerlIO *ptr;
{
/* Needs work for PerlIO ! */
FILE *f = PerlIO_findFILE(ptr);
#endif
int
-IsWin95(void) {
+IsWin95(void)
+{
return (os_id() == VER_PLATFORM_WIN32_WINDOWS);
}
int
-IsWinNT(void) {
+IsWinNT(void)
+{
return (os_id() == VER_PLATFORM_WIN32_NT);
}
#ifdef NOTUSED
bool
-hdelete(tb,key)
-register HASH *tb;
-char *key;
+hdelete(register HASH *tb, char *key)
{
register char *s;
register int i;
}
#ifdef NOTUSED
-hshow(tb)
-register HASH *tb;
+hshow(register HASH *tb)
{
fprintf(stderr,"%5d %4d (%2d%%)\n",
tb->tbl_max+1,