summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/lib/uexit.c
blob: 90a4d9f76a4e3682025524a7500422a45cda02b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* uexit.c: define uexit to do an exit with the right status.  We can't
   just call `exit' from the web files, since the webs use `exit' as a
   loop label.  Public domain. */

#include <w2c/config.h>

void
uexit (int unix_code)
{
  int final_code;
  
  if (unix_code == 0)
    final_code = EXIT_SUCCESS;
  else if (unix_code == 1)
    final_code = EXIT_FAILURE;
  else
    final_code = unix_code;
  
  exit (final_code);
}