Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make Remove !__STDC__ stuff, de-__P(), ANSIfy, and d...
details: https://anonhg.NetBSD.org/src/rev/51594513dd15
branches: trunk
changeset: 532820:51594513dd15
user: wiz <wiz%NetBSD.org@localhost>
date: Sat Jun 15 18:24:55 2002 +0000
description:
Remove !__STDC__ stuff, de-__P(), ANSIfy, and de-register.
diffstat:
usr.bin/make/arch.c | 124 +++++----
usr.bin/make/buf.c | 48 +--
usr.bin/make/buf.h | 18 +-
usr.bin/make/compat.c | 41 +-
usr.bin/make/cond.c | 115 +++-----
usr.bin/make/dir.c | 203 ++++++++-------
usr.bin/make/dir.h | 32 +-
usr.bin/make/for.c | 25 +-
usr.bin/make/hash.c | 99 ++++---
usr.bin/make/hash.h | 16 +-
usr.bin/make/job.c | 311 +++++++++++++-----------
usr.bin/make/job.h | 38 +-
usr.bin/make/lst.h | 68 ++--
usr.bin/make/lst.lib/lstAppend.c | 22 +-
usr.bin/make/lst.lib/lstAtEnd.c | 16 +-
usr.bin/make/lst.lib/lstAtFront.c | 12 +-
usr.bin/make/lst.lib/lstClose.c | 14 +-
usr.bin/make/lst.lib/lstConcat.c | 28 +-
usr.bin/make/lst.lib/lstDatum.c | 9 +-
usr.bin/make/lst.lib/lstDeQueue.c | 11 +-
usr.bin/make/lst.lib/lstDestroy.c | 16 +-
usr.bin/make/lst.lib/lstDupl.c | 21 +-
usr.bin/make/lst.lib/lstEnQueue.c | 10 +-
usr.bin/make/lst.lib/lstFind.c | 11 +-
usr.bin/make/lst.lib/lstFindFrom.c | 15 +-
usr.bin/make/lst.lib/lstFirst.c | 9 +-
usr.bin/make/lst.lib/lstForEach.c | 11 +-
usr.bin/make/lst.lib/lstForEachFrom.c | 19 +-
usr.bin/make/lst.lib/lstInit.c | 14 +-
usr.bin/make/lst.lib/lstInsert.c | 22 +-
usr.bin/make/lst.lib/lstIsAtEnd.c | 11 +-
usr.bin/make/lst.lib/lstIsEmpty.c | 9 +-
usr.bin/make/lst.lib/lstLast.c | 9 +-
usr.bin/make/lst.lib/lstMember.c | 12 +-
usr.bin/make/lst.lib/lstNext.c | 13 +-
usr.bin/make/lst.lib/lstOpen.c | 9 +-
usr.bin/make/lst.lib/lstRemove.c | 14 +-
usr.bin/make/lst.lib/lstReplace.c | 10 +-
usr.bin/make/lst.lib/lstSucc.c | 9 +-
usr.bin/make/main.c | 136 +++-------
usr.bin/make/make.c | 132 ++++++----
usr.bin/make/make.h | 58 +---
usr.bin/make/nonints.h | 180 +++++++-------
usr.bin/make/parse.c | 269 +++++++++-----------
usr.bin/make/str.c | 54 +--
usr.bin/make/suff.c | 310 +++++++++++++-----------
usr.bin/make/targ.c | 132 +++++-----
usr.bin/make/trace.c | 18 +-
usr.bin/make/util.c | 93 +-----
usr.bin/make/var.c | 427 +++++++++++++++++----------------
50 files changed, 1599 insertions(+), 1704 deletions(-)
diffs (truncated from 8147 to 300 lines):
diff -r 5b449ad53927 -r 51594513dd15 usr.bin/make/arch.c
--- a/usr.bin/make/arch.c Sat Jun 15 18:01:05 2002 +0000
+++ b/usr.bin/make/arch.c Sat Jun 15 18:24:55 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arch.c,v 1.34 2001/11/30 01:29:48 thorpej Exp $ */
+/* $NetBSD: arch.c,v 1.35 2002/06/15 18:24:55 wiz Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -39,14 +39,14 @@
*/
#ifdef MAKE_BOOTSTRAP
-static char rcsid[] = "$NetBSD: arch.c,v 1.34 2001/11/30 01:29:48 thorpej Exp $";
+static char rcsid[] = "$NetBSD: arch.c,v 1.35 2002/06/15 18:24:55 wiz Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94";
#else
-__RCSID("$NetBSD: arch.c,v 1.34 2001/11/30 01:29:48 thorpej Exp $");
+__RCSID("$NetBSD: arch.c,v 1.35 2002/06/15 18:24:55 wiz Exp $");
#endif
#endif /* not lint */
#endif
@@ -103,12 +103,14 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/param.h>
-#include <ctype.h>
+
#include <ar.h>
-#include <utime.h>
+#include <ctype.h>
+#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
-#include <fcntl.h>
+#include <utime.h>
+
#include "make.h"
#include "hash.h"
#include "dir.h"
@@ -133,15 +135,15 @@
size_t fnamesize; /* Size of the string table */
} Arch;
-static int ArchFindArchive __P((ClientData, ClientData));
+static int ArchFindArchive(ClientData, ClientData);
#ifdef CLEANUP
-static void ArchFree __P((ClientData));
+static void ArchFree(ClientData);
#endif
-static struct ar_hdr *ArchStatMember __P((char *, char *, Boolean));
-static FILE *ArchFindMember __P((char *, char *, struct ar_hdr *, char *));
+static struct ar_hdr *ArchStatMember(char *, char *, Boolean);
+static FILE *ArchFindMember(char *, char *, struct ar_hdr *, char *);
#if defined(__svr4__) || defined(__SVR4) || defined(__ELF__)
#define SVR4ARCHIVES
-static int ArchSVR4Entry __P((Arch *, char *, size_t, FILE *));
+static int ArchSVR4Entry(Arch *, char *, size_t, FILE *);
#endif
#ifdef CLEANUP
@@ -159,8 +161,7 @@
*-----------------------------------------------------------------------
*/
static void
-ArchFree(ap)
- ClientData ap;
+ArchFree(ClientData ap)
{
Arch *a = (Arch *) ap;
Hash_Search search;
@@ -189,6 +190,11 @@
* the nodes for the specified archive members, placing their nodes
* on the given list.
*
+ * Input:
+ * linePtr Pointer to start of specification
+ * nodeLst Lst on which to place the nodes
+ * ctxt Context in which to expand variables
+ *
* Results:
* SUCCESS if it was a valid specification. The linePtr is updated
* to point to the first non-space after the archive spec. The
@@ -200,12 +206,9 @@
*-----------------------------------------------------------------------
*/
ReturnStatus
-Arch_ParseArchive (linePtr, nodeLst, ctxt)
- char **linePtr; /* Pointer to start of specification */
- Lst nodeLst; /* Lst on which to place the nodes */
- GNode *ctxt; /* Context in which to expand variables */
+Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode *ctxt)
{
- register char *cp; /* Pointer into line */
+ char *cp; /* Pointer into line */
GNode *gn; /* New node */
char *libName; /* Library-part of specification */
char *memName; /* Member-part of specification */
@@ -449,6 +452,10 @@
* See if the given archive is the one we are looking for. Called
* From ArchStatMember and ArchFindMember via Lst_Find.
*
+ * Input:
+ * ar Current list element
+ * archName Name we want
+ *
* Results:
* 0 if it is, non-zero if it isn't.
*
@@ -458,11 +465,9 @@
*-----------------------------------------------------------------------
*/
static int
-ArchFindArchive (ar, archName)
- ClientData ar; /* Current list element */
- ClientData archName; /* Name we want */
+ArchFindArchive(ClientData ar, ClientData archName)
{
- return (strcmp ((char *) archName, ((Arch *) ar)->name));
+ return (strcmp((char *) archName, ((Arch *) ar)->name));
}
/*-
@@ -471,6 +476,12 @@
* Locate a member of an archive, given the path of the archive and
* the path of the desired member.
*
+ * Input:
+ * archive Path to the archive
+ * member Name of member. If it is a path, only the last
+ * component is used.
+ * hash TRUE if archive should be hashed if not already so.
+ *
* Results:
* A pointer to the current struct ar_hdr structure for the member. Note
* That no position is returned, so this is not useful for touching
@@ -483,12 +494,7 @@
*-----------------------------------------------------------------------
*/
static struct ar_hdr *
-ArchStatMember (archive, member, hash)
- char *archive; /* Path to the archive */
- char *member; /* Name of member. If it is a path, only the
- * last component is used. */
- Boolean hash; /* TRUE if archive should be hashed if not
- * already so. */
+ArchStatMember(char *archive, char *member, Boolean hash)
{
#define AR_MAX_NAME_LEN (sizeof(arh.ar_name)-1)
FILE * arch; /* Stream to archive */
@@ -706,11 +712,7 @@
*-----------------------------------------------------------------------
*/
static int
-ArchSVR4Entry(ar, name, size, arch)
- Arch *ar;
- char *name;
- size_t size;
- FILE *arch;
+ArchSVR4Entry(Arch *ar, char *name, size_t size, FILE *arch)
{
#define ARLONGNAMES1 "//"
#define ARLONGNAMES2 "/ARFILENAMES"
@@ -797,6 +799,13 @@
* the path of the desired member. If the archive is to be modified,
* the mode should be "r+", if not, it should be "r".
*
+ * Input:
+ * archive Path to the archive
+ * member Name of member. If it is a path, only the last
+ * component is used.
+ * arhPtr Pointer to header structure to be filled in
+ * mode The mode for opening the stream
+ *
* Results:
* An FILE *, opened for reading and writing, positioned at the
* start of the member's struct ar_hdr, or NULL if the member was
@@ -808,12 +817,7 @@
*-----------------------------------------------------------------------
*/
static FILE *
-ArchFindMember (archive, member, arhPtr, mode)
- char *archive; /* Path to the archive */
- char *member; /* Name of member. If it is a path, only the
- * last component is used. */
- struct ar_hdr *arhPtr; /* Pointer to header structure to be filled in */
- char *mode; /* The mode for opening the stream */
+ArchFindMember(char *archive, char *member, struct ar_hdr *arhPtr, char *mode)
{
FILE * arch; /* Stream to archive */
int size; /* Size of archive member */
@@ -942,6 +946,9 @@
* Arch_Touch --
* Touch a member of an archive.
*
+ * Input:
+ * gn Node of member to touch
+ *
* Results:
* The 'time' field of the member's header is updated.
*
@@ -953,8 +960,7 @@
*-----------------------------------------------------------------------
*/
void
-Arch_Touch (gn)
- GNode *gn; /* Node of member to touch */
+Arch_Touch(GNode *gn)
{
FILE * arch; /* Stream open to archive, positioned properly */
struct ar_hdr arh; /* Current header describing member */
@@ -981,6 +987,9 @@
* Given a node which represents a library, touch the thing, making
* sure that the table of contents also is touched.
*
+ * Input:
+ * gn The node of the library to touch
+ *
* Results:
* None.
*
@@ -991,8 +1000,7 @@
*-----------------------------------------------------------------------
*/
void
-Arch_TouchLib (gn)
- GNode *gn; /* The node of the library to touch */
+Arch_TouchLib(GNode *gn)
{
#ifdef RANLIBMAG
FILE * arch; /* Stream open to archive */
@@ -1017,6 +1025,9 @@
* Arch_MTime --
* Return the modification time of a member of an archive.
*
+ * Input:
+ * gn Node describing archive member
+ *
* Results:
* The modification time (seconds).
*
@@ -1027,8 +1038,7 @@
*-----------------------------------------------------------------------
*/
time_t
-Arch_MTime (gn)
- GNode *gn; /* Node describing archive member */
+Arch_MTime(GNode *gn)
{
struct ar_hdr *arhPtr; /* Header of desired member */
time_t modTime; /* Modification time as an integer */
@@ -1067,8 +1077,7 @@
*-----------------------------------------------------------------------
*/
time_t
-Arch_MemMTime (gn)
- GNode *gn;
+Arch_MemMTime(GNode *gn)
{
LstNode ln;
GNode *pgn;
@@ -1117,6 +1126,10 @@
* Arch_FindLib --
* Search for a library along the given search path.
*
+ * Input:
+ * gn Node of library to find
+ * path Search path
+ *
* Results:
* None.
*
@@ -1133,9 +1146,7 @@
*-----------------------------------------------------------------------
*/
void
-Arch_FindLib (gn, path)
- GNode *gn; /* Node of library to find */
- Lst path; /* Search path */
+Arch_FindLib(GNode *gn, Lst path)
{
char *libName; /* file name for archive */
size_t sz = strlen(gn->name) + 6 - 2;
@@ -1182,6 +1193,9 @@
* of the archive, not by ranlib rules, which affect the
* TOC.
*
+ * Input:
+ * gn The library's graph node
+ *
* Results:
* TRUE if the library is out-of-date. FALSE otherwise.
*
@@ -1191,8 +1205,7 @@
*-----------------------------------------------------------------------
*/
Home |
Main Index |
Thread Index |
Old Index