modeedit.c (525689f1021dc672005bcc605d4f36ea986fbe23) modeedit.c (c60e19a83b862d27963ab1c3f037191d12ff6502)
1/*
2 * Written By Julian ELischer
3 * Copyright julian Elischer 1993.
4 * Permission is granted to use or redistribute this file in any way as long
5 * as this notice remains. Julian Elischer does not guarantee that this file
6 * is totally correct for any given task and users of this file must
7 * accept responsibility for any damage that occurs from the application of this
8 * file.

--- 31 unchanged lines hidden (view full) ---

40 * SUCH DAMAGE.
41 */
42/*
43 * Taken from the original scsi(8) program.
44 * from: scsi.c,v 1.17 1998/01/12 07:57:57 charnier Exp $";
45 */
46#ifndef lint
47static const char rcsid[] =
1/*
2 * Written By Julian ELischer
3 * Copyright julian Elischer 1993.
4 * Permission is granted to use or redistribute this file in any way as long
5 * as this notice remains. Julian Elischer does not guarantee that this file
6 * is totally correct for any given task and users of this file must
7 * accept responsibility for any damage that occurs from the application of this
8 * file.

--- 31 unchanged lines hidden (view full) ---

40 * SUCH DAMAGE.
41 */
42/*
43 * Taken from the original scsi(8) program.
44 * from: scsi.c,v 1.17 1998/01/12 07:57:57 charnier Exp $";
45 */
46#ifndef lint
47static const char rcsid[] =
48 "$Id$";
48 "$Id: modeedit.c,v 1.1 1998/09/15 06:43:02 gibbs Exp $";
49#endif /* not lint */
50
51#include <ctype.h>
52#include <err.h>
53#include <errno.h>
54#include <string.h>
55#include <stdlib.h>
56#include <stdio.h>

--- 14 unchanged lines hidden (view full) ---

71iget(void *hook, char *name)
72{
73 struct get_hook *h = (struct get_hook *)hook;
74 int arg;
75
76 if (h->got >= h->argc)
77 {
78 fprintf(stderr, "Expecting an integer argument.\n");
49#endif /* not lint */
50
51#include <ctype.h>
52#include <err.h>
53#include <errno.h>
54#include <string.h>
55#include <stdlib.h>
56#include <stdio.h>

--- 14 unchanged lines hidden (view full) ---

71iget(void *hook, char *name)
72{
73 struct get_hook *h = (struct get_hook *)hook;
74 int arg;
75
76 if (h->got >= h->argc)
77 {
78 fprintf(stderr, "Expecting an integer argument.\n");
79 usage();
79 usage(0);
80 exit(1);
81 }
82 arg = strtol(h->argv[h->got], 0, 0);
83 h->got++;
84
85 if (verbose && name && *name)
86 printf("%s: %d\n", name, arg);
87

--- 6 unchanged lines hidden (view full) ---

94cget(void *hook, char *name)
95{
96 struct get_hook *h = (struct get_hook *)hook;
97 char *arg;
98
99 if (h->got >= h->argc)
100 {
101 fprintf(stderr, "Expecting a character pointer argument.\n");
80 exit(1);
81 }
82 arg = strtol(h->argv[h->got], 0, 0);
83 h->got++;
84
85 if (verbose && name && *name)
86 printf("%s: %d\n", name, arg);
87

--- 6 unchanged lines hidden (view full) ---

94cget(void *hook, char *name)
95{
96 struct get_hook *h = (struct get_hook *)hook;
97 char *arg;
98
99 if (h->got >= h->argc)
100 {
101 fprintf(stderr, "Expecting a character pointer argument.\n");
102 usage();
102 usage(0);
103 exit(1);
104 }
105 arg = h->argv[h->got];
106 h->got++;
107
108 if (verbose && name)
109 printf("cget: %s: %s", name, arg);
110

--- 390 unchanged lines hidden ---
103 exit(1);
104 }
105 arg = h->argv[h->got];
106 h->got++;
107
108 if (verbose && name)
109 printf("cget: %s: %s", name, arg);
110

--- 390 unchanged lines hidden ---