home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / directry / mv / error.c < prev    next >
Encoding:
Text File  |  1994-06-05  |  1.4 KB  |  39 lines

  1. /*
  2.  8-Sep-86 16:33:37-PDT,1389;000000000000
  3. Return-Path: <pwu@unix.macc.wisc.edu>
  4. Received: FROM UNIX.MACC.WISC.EDU BY B.ISI.EDU WITH TCP ; 8 Sep 86 16:33:05 PDT
  5. Received: by unix.macc.wisc.edu;
  6.           id AA04941; 4.12/5; Mon, 8 Sep 86 17:31:04 cdt
  7. Date: Mon, 8 Sep 86 17:31:04 cdt
  8. From: Peter Wu <pwu@unix.macc.wisc.edu>
  9. Message-Id: <8609082231.AA04941@unix.macc.wisc.edu>
  10. To: info-ibmpc-request@mosis
  11. Subject: error.c
  12. */
  13. /* handle internal errors */
  14.  
  15.  
  16. /* global variable */
  17. int brk_st;  /* orginal break status */
  18.  
  19. error(where,panic)
  20. char *where;  /* call from what procedure */
  21. int panic;  /* should I tell the user to panic? 0=no 1=yes */
  22. {
  23.   putn("MV stopped due to internal error in '", where, "'\n\015", 0);
  24.   if (panic) {  /* this should never happen */
  25.     putn("Because of this error, your disk directory might be in an\n\015",
  26.          "inconsistent state. Please run chkdsk on your disk to see\n\015",
  27.          "if this is so. Sorry.\n\015", 0);
  28.   } else {  /* not to panic */
  29.     putn("Do not worry, your disk is not screwed up, only that the\n\015",
  30.          "operation you requested was not completed.\n\015", 0);
  31.   }
  32.   putn("Please report this error to the author of this program. You can\n\015",
  33.        "obtain his email address by typing 'mv' with no parameters.\n\015", 0);
  34.  
  35.   /* now restore break status to whatever the user set it to */
  36.   bset(brk_st);
  37.   exit(2);  /* indicate internal error */
  38. }
  39.