diff options
author | 2016-01-11 18:49:37 +0000 | |
---|---|---|
committer | 2016-01-11 18:49:37 +0000 | |
commit | 38feabcea3da35fc46aa4498442ed84bc4d4da38 (patch) | |
tree | 03d035bb03216872308cca466c1e0f3ce8ebe1de | |
parent | Remove '-v' and related version handling. Use strncasecmp() instead (diff) | |
download | wireguard-openbsd-38feabcea3da35fc46aa4498442ed84bc4d4da38.tar.xz wireguard-openbsd-38feabcea3da35fc46aa4498442ed84bc4d4da38.zip |
Nuke now unused files.
ok deraadt@ jasper@
-rw-r--r-- | sbin/pdisk/util.c | 129 | ||||
-rw-r--r-- | sbin/pdisk/util.h | 60 | ||||
-rw-r--r-- | sbin/pdisk/version.h | 84 |
3 files changed, 0 insertions, 273 deletions
diff --git a/sbin/pdisk/util.c b/sbin/pdisk/util.c deleted file mode 100644 index efb51445bc3..00000000000 --- a/sbin/pdisk/util.c +++ /dev/null @@ -1,129 +0,0 @@ -/* $OpenBSD: util.c,v 1.8 2016/01/11 07:54:07 jasper Exp $ */ - -/* - * util.c - - * - * Written by Eryk Vershen - */ - -/* - * Copyright 1997,1998 by Apple Computer, Inc. - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and - * its documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appears in all copies and - * that both the copyright notice and this permission notice appear in - * supporting documentation. - * - * APPLE COMPUTER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL APPLE COMPUTER BE LIABLE FOR ANY SPECIAL, INDIRECT, OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, - * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION - * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - - -#include <stdio.h> -#include <ctype.h> -#include <err.h> - -#include "version.h" -#include "util.h" - - -/* - * Defines - */ -#define NumToolboxTraps() ( \ - (NGetTrapAddress(_InitGraf, ToolTrap) \ - == NGetTrapAddress(0xAA6E, ToolTrap)) \ - ? 0x200 : 0x400 \ - ) -#define GetTrapType(theTrap) ( \ - (((theTrap) & 0x800) != 0) ? ToolTrap : OSTrap \ - ) - - -/* - * Types - */ - - -/* - * Global Constants - */ - - -/* - * Forward declarations - */ - - -/* - * Routines - */ -/* Ascii case-insensitive string comparison */ -int -istrncmp(const char *x, const char *y, long len) -{ - const unsigned char *p = (const unsigned char *)x; - const unsigned char *q = (const unsigned char *)y; - - while (len > 0) { - if (tolower(*p) != tolower(*q)) { - return (*p - *q); - } else if (*p == 0) { - break; - } - p++; - q++; - len--; - } - return (0); -} - - -const char * -get_version_string(void) -{ - int stage; - char *dynamic_version; - /* "copy" of stuff from SysTypes.r, since we can't include that*/ - enum {development = 0x20, alpha = 0x40, beta = 0x60, final = 0x80, /* or */ release = 0x80}; - - switch (kVersionStage) { - case development: stage = 'd'; break; - case alpha: stage = 'a'; break; - case beta: stage = 'b'; break; - case final: stage = 'f'; break; - default: stage = '?'; break; - } - - if (kVersionBugFix != 0) { - if (kVersionStage == final) { - if (asprintf(&dynamic_version, "%d.%d.%d", kVersionMajor, - kVersionMinor, kVersionBugFix) == -1) - err(1, "asprintf"); - } else { - if (asprintf(&dynamic_version, "%d.%d.%d%c%d", kVersionMajor, - kVersionMinor, kVersionBugFix, stage, kVersionDelta) == -1) - err(1, "asprintf"); - } - } else { - if (kVersionStage == final) { - if (asprintf(&dynamic_version, "%d.%d", kVersionMajor, - kVersionMinor) == -1) - err(1, "asprintf"); - } else { - if (asprintf(&dynamic_version, "%d.%d%c%d", kVersionMajor, - kVersionMinor, stage, kVersionDelta) == -1) - err(1, "asprintf"); - } - } - return dynamic_version; -} diff --git a/sbin/pdisk/util.h b/sbin/pdisk/util.h deleted file mode 100644 index 5211b28345c..00000000000 --- a/sbin/pdisk/util.h +++ /dev/null @@ -1,60 +0,0 @@ -/* $OpenBSD: util.h,v 1.6 2016/01/11 07:54:07 jasper Exp $ */ - -/* - * util.h - - * - * Written by Eryk Vershen - */ - -/* - * Copyright 1997,1998 by Apple Computer, Inc. - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and - * its documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appears in all copies and - * that both the copyright notice and this permission notice appear in - * supporting documentation. - * - * APPLE COMPUTER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL APPLE COMPUTER BE LIABLE FOR ANY SPECIAL, INDIRECT, OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, - * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION - * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef __util__ -#define __util__ - - -/* - * Defines - */ - - -/* - * Types - */ - - -/* - * Global Constants - */ - - -/* - * Global Variables - */ - - -/* - * Forward declarations - */ -int istrncmp(const char *x, const char *y, long len); -const char *get_version_string(void); - -#endif /* __util__ */ diff --git a/sbin/pdisk/version.h b/sbin/pdisk/version.h deleted file mode 100644 index 44f05daad35..00000000000 --- a/sbin/pdisk/version.h +++ /dev/null @@ -1,84 +0,0 @@ -/* $OpenBSD: version.h,v 1.5 2016/01/11 07:54:07 jasper Exp $ */ - -/* - * version.h - version number for pdisk program - * - * Written by Eryk Vershen - */ - -/* - * Copyright 1997 by Apple Computer, Inc. - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and - * its documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appears in all copies and - * that both the copyright notice and this permission notice appear in - * supporting documentation. - * - * APPLE COMPUTER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL APPLE COMPUTER BE LIABLE FOR ANY SPECIAL, INDIRECT, OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, - * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION - * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ -#ifndef __version__ -#define __version__ - - -/* - * Defines - */ -/* - * TO ADJUST THE VERSION - change the following six macros. - * - * A version is of the form: N.M{.X}{yZ} - * - * N is two digits indicating the major version - * M is a single digit indicating relative revision - * X is a single digit indicating a bug fix revision - * y is a character from the set [dab] indicating stage (dev,alpha,beta) - * Z is two digits indicating the delta within the stage - * - * Note that within the 'vers' resource all these fields end up - * comprising a four byte unsigned integer with the property that any later - * version will be represented by a larger number. - */ - -#define VERSION "0.8a2" -#define RELEASE_DATE "16 May 2000" - -#define kVersionMajor 0x00 /* ie. N has two BCD digits */ -#define kVersionMinor 0x8 /* ie. M has a single BCD digit */ -#define kVersionBugFix 0x0 /* ie. X has a single BCD digit */ -#define kVersionStage alpha /* ie. y is one of the set - */ - /* {development,alpha,beta,final} - * also, release is a synonym for final - */ -#define kVersionDelta 0x02 /* ie. Z has two BCD digits */ - - -/* - * Types - */ - - -/* - * Global Constants - */ - - -/* - * Global Variables - */ - - -/* - * Forward declarations - */ - -#endif /* __version__ */ |