chkgrp.c (7f69f4fdb0d706c733acdabd4accab204920b91d) chkgrp.c (0afcb0871da6a09c7100ad4ab000ddeb11a305c2)
1/*-
2 * Copyright (c) 1998 Dag-Erling Co�dan Sm�rgrav
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

29#ifndef lint
30static const char rcsid[] =
31 "$FreeBSD$";
32#endif /* not lint */
33
34#include <err.h>
35#include <ctype.h>
36#include <stdio.h>
1/*-
2 * Copyright (c) 1998 Dag-Erling Co�dan Sm�rgrav
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

29#ifndef lint
30static const char rcsid[] =
31 "$FreeBSD$";
32#endif /* not lint */
33
34#include <err.h>
35#include <ctype.h>
36#include <stdio.h>
37#include <stdlib.h>
37#include <string.h>
38#include <sysexits.h>
39
38#include <string.h>
39#include <sysexits.h>
40
40void
41static void
41usage(void)
42{
43 fprintf(stderr, "usage: chkgrp [groupfile]\n");
44 exit(EX_USAGE);
45}
46
47int
48main(int argc, char *argv[])
49{
42usage(void)
43{
44 fprintf(stderr, "usage: chkgrp [groupfile]\n");
45 exit(EX_USAGE);
46}
47
48int
49main(int argc, char *argv[])
50{
50 unsigned int len;
51 int n = 0, i, k, e = 0;
52 char *gfn, *line, *f[4], *p;
51 unsigned int i, len;
52 int n = 0, k, e = 0;
53 char *line, *f[4], *p;
54 const char *gfn;
53 FILE *gf;
54
55 /* check arguments */
56 switch (argc) {
57 case 1:
58 gfn = "/etc/group";
59 break;
60 case 2:

--- 81 unchanged lines hidden ---
55 FILE *gf;
56
57 /* check arguments */
58 switch (argc) {
59 case 1:
60 gfn = "/etc/group";
61 break;
62 case 2:

--- 81 unchanged lines hidden ---