Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/machine Shell script implementation of "machine" by me.



details:   https://anonhg.NetBSD.org/src/rev/46656469be13
branches:  trunk
changeset: 475038:46656469be13
user:      hubertf <hubertf%NetBSD.org@localhost>
date:      Fri Jul 30 02:07:15 1999 +0000

description:
Shell script implementation of "machine" by me.

I hereby place this into the public domain, the script contains
no copyright header to make it small. Replacing the binary
implementation saves 8k on /usr.

See also PRs 6614 and 361.

diffstat:

 usr.bin/machine/Makefile   |   5 ++-
 usr.bin/machine/machine.c  |  59 ----------------------------------------------
 usr.bin/machine/machine.sh |   2 +
 3 files changed, 5 insertions(+), 61 deletions(-)

diffs (82 lines):

diff -r 2d68bf7b4698 -r 46656469be13 usr.bin/machine/Makefile
--- a/usr.bin/machine/Makefile  Fri Jul 30 01:56:49 1999 +0000
+++ b/usr.bin/machine/Makefile  Fri Jul 30 02:07:15 1999 +0000
@@ -1,6 +1,7 @@
-#      $NetBSD: Makefile,v 1.3 1997/01/09 20:20:37 tls Exp $
+#      $NetBSD: Makefile,v 1.4 1999/07/30 02:07:15 hubertf Exp $
 #      from: @(#)Makefile      5.3 (Berkeley) 5/11/90
 
-PROG=  machine
+MAN=           machine.1
+SCRIPTS=       machine.sh
 
 .include <bsd.prog.mk>
diff -r 2d68bf7b4698 -r 46656469be13 usr.bin/machine/machine.c
--- a/usr.bin/machine/machine.c Fri Jul 30 01:56:49 1999 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*     $NetBSD: machine.c,v 1.4 1997/10/19 04:41:04 lukem Exp $        */
-
-/*
- * Copyright (c) 1986 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-#ifndef lint
-__COPYRIGHT("@(#) Copyright (c) 1986 Regents of the University of California.\n\
- All rights reserved.\n");
-#endif /* not lint */
-
-#ifndef lint
-/*static char sccsid[] = "from: @(#)machine.c  5.5 (Berkeley) 6/1/90";*/
-__RCSID("$NetBSD: machine.c,v 1.4 1997/10/19 04:41:04 lukem Exp $");
-#endif /* not lint */
-
-#include <sys/param.h>
-#include <stdio.h>
-
-int    main __P((int, char **));
-
-int
-main(argc, argv)
-       int argc;
-       char *argv[];
-{
-       puts(MACHINE);
-       exit(0);
-}
diff -r 2d68bf7b4698 -r 46656469be13 usr.bin/machine/machine.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/machine/machine.sh        Fri Jul 30 02:07:15 1999 +0000
@@ -0,0 +1,2 @@
+#! /bin/sh
+/usr/bin/uname -p



Home | Main Index | Thread Index | Old Index