1: /*
   2:  * Copyright (c) 1980 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #ifndef lint
   8: char copyright[] =
   9: "@(#) Copyright (c) 1980 Regents of the University of California.\n\
  10:  All rights reserved.\n";
  11: #endif not lint
  12: 
  13: #ifndef lint
  14: static char sccsid[] = "@(#)pwd.c	5.1 (Berkeley) 4/30/85";
  15: #endif not lint
  16: 
  17: /*
  18:  * Print working (current) directory
  19:  */
  20: #include <stdio.h>
  21: #include <sys/param.h>
  22: 
  23: char *getwd();
  24: 
  25: main()
  26: {
  27:     char pathname[MAXPATHLEN + 1];
  28: 
  29:     if (getwd(pathname) == NULL) {
  30:         fprintf(stderr, "pwd: %s\n", pathname);
  31:         exit(1);
  32:     }
  33:     printf("%s\n", pathname);
  34:     exit(0);
  35: }

Defined functions

main defined in line 25; never used

Defined variables

copyright defined in line 8; never used
sccsid defined in line 14; never used
Last modified: 1987-02-08
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2637
Valid CSS Valid XHTML 1.0 Strict