home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / ip / ppp / dp-2.3 / dpd / progname.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-22  |  2.1 KB  |  51 lines

  1. /*
  2. **  Store and set the global variable that contains the program's name.
  3. **  Copyright (c) 1991 Bolt Beranek and Newman, Inc.
  4. **  All rights reserved.
  5. **
  6. **  Redistribution and use in source and binary forms are permitted
  7. **  provided that: (1) source distributions retain this entire copyright
  8. **  notice and comment, and (2) distributions including binaries display
  9. **  the following acknowledgement:  ``This product includes software
  10. **  developed by Bolt Beranek and Newman, Inc. and CREN/CSNET'' in the
  11. **  documentation or other materials provided with the distribution and in
  12. **  all advertising materials mentioning features or use of this software.
  13. **  Neither the name of Bolt Beranek and Newman nor CREN/CSNET may be used
  14. **  to endorse or promote products derived from this software without
  15. **  specific prior written permission.
  16. **
  17. **  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  18. **  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  19. **  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  20. */
  21. /*
  22.  * Copyright (c) 1992 Purdue University
  23.  * All rights reserved.
  24.  *
  25.  * Redistribution and use in source and binary forms are permitted
  26.  * provided that the above copyright notice and this paragraph are
  27.  * duplicated in all such forms and that any documentation,
  28.  * advertising materials, and other materials related to such
  29.  * distribution and use acknowledge that the software was developed
  30.  * by Purdue University.  The name of the University may not be used
  31.  * to endorse or promote products derived * from this software without
  32.  * specific prior written permission.
  33.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  34.  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  35.  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  36.  *
  37.  * Note: this copyright applies to portions of this software developed
  38.  * at Purdue beyond the software covered by the original copyright.
  39.  */
  40. #include <stdio.h>
  41. char    *progname = "<program>";
  42.  
  43. setprogname(name)
  44.     char    *name;
  45. {
  46.     extern char    *strrchr();
  47.     char    *p;
  48.  
  49.     progname = (p = strrchr(name, '/')) == NULL ? name : p + 1;
  50. }
  51.