1 /*
2 * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
3 */
4
5 /*
6 * Copyright (c) 1988 Regents of the University of California.
7 * All rights reserved.
8 *
9 * This code is derived from software contributed to Berkeley by
10 * Computer Consoles Inc.
11 *
12 * Redistribution and use in source and binary forms are permitted
13 * provided that: (1) source distributions retain this entire copyright
14 * notice and comment, and (2) distributions including binaries display
15 * the following acknowledgement: ``This product includes software
16 * developed by the University of California, Berkeley and its contributors''
17 * in the documentation or other materials provided with the distribution
18 * and in all advertising materials mentioning features or use of this
19 * software. Neither the name of the University nor the names of its
20 * contributors may be used to endorse or promote products derived
21 * from this software without specific prior written permission.
366 };
367
368 /*
369 * main - lines are read up to the unprotected ('\') newline and
370 * held in an input buffer. Characters may be read from the
371 * input buffer using getachar() and unread using ungetachar().
372 * Reading the whole line ahead allows the use of debuggers
373 * which would otherwise be impossible since the debugger
374 * and fsdb could not share stdin.
375 */
376
377 int
378 main(int argc, char *argv[])
379 {
380
381 char c, *cptr;
382 short i;
383 struct direct *dirp;
384 struct lbuf *bp;
385 char *progname;
386 short colon, mode;
387 long temp;
388
389 /* Options/Suboptions processing */
390 int opt;
391 char *subopts;
392 char *optval;
393
394 /*
395 * The following are used to support the old fsdb functionality
396 * of clearing an inode. It's better to use 'clri'.
397 */
398 int inum; /* Inode number to clear */
399 char *special;
400
401 setbuf(stdin, NULL);
402 progname = argv[0];
403 prompt = &PROMPT[0];
404 /*
405 * Parse options.
406 */
|
1 /*
2 * Copyright 2015 Gary Mills
3 * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
4 */
5
6 /*
7 * Copyright (c) 1988 Regents of the University of California.
8 * All rights reserved.
9 *
10 * This code is derived from software contributed to Berkeley by
11 * Computer Consoles Inc.
12 *
13 * Redistribution and use in source and binary forms are permitted
14 * provided that: (1) source distributions retain this entire copyright
15 * notice and comment, and (2) distributions including binaries display
16 * the following acknowledgement: ``This product includes software
17 * developed by the University of California, Berkeley and its contributors''
18 * in the documentation or other materials provided with the distribution
19 * and in all advertising materials mentioning features or use of this
20 * software. Neither the name of the University nor the names of its
21 * contributors may be used to endorse or promote products derived
22 * from this software without specific prior written permission.
367 };
368
369 /*
370 * main - lines are read up to the unprotected ('\') newline and
371 * held in an input buffer. Characters may be read from the
372 * input buffer using getachar() and unread using ungetachar().
373 * Reading the whole line ahead allows the use of debuggers
374 * which would otherwise be impossible since the debugger
375 * and fsdb could not share stdin.
376 */
377
378 int
379 main(int argc, char *argv[])
380 {
381
382 char c, *cptr;
383 short i;
384 struct direct *dirp;
385 struct lbuf *bp;
386 char *progname;
387 volatile short colon;
388 short mode;
389 long temp;
390
391 /* Options/Suboptions processing */
392 int opt;
393 char *subopts;
394 char *optval;
395
396 /*
397 * The following are used to support the old fsdb functionality
398 * of clearing an inode. It's better to use 'clri'.
399 */
400 int inum; /* Inode number to clear */
401 char *special;
402
403 setbuf(stdin, NULL);
404 progname = argv[0];
405 prompt = &PROMPT[0];
406 /*
407 * Parse options.
408 */
|