err = pthread_create(&unused_id, &attr, &audio_loop, NULL);
if (err != 0) {
fprintf(stderr, "Can't create audio thread :[%s]", strerror(err));
- exit(1);
+ exit(EXIT_FAILURE);
}
}
ioctl(dsp_fd, SNDCTL_DSP_RESET, 0);
if (mixer_fd >= 0)
ioctl(mixer_fd, SOUND_MIXER_WRITE_VOLUME, &old_volume);
- _exit(0);
+ _exit(EXIT_SUCCESS);
}
static void oss_sigint_handler(int signal) {
dsp_fd = open(SOUND_DEV, O_WRONLY);
if (dsp_fd < 0) {
perror(SOUND_DEV);
- _exit(1);
+ _exit(EXIT_FAILURE);
}
*/
if (ioctl(dsp_fd, SNDCTL_DSP_SETFMT, &format) == -1) {
perror(SOUND_DEV);
- exit(1);
+ exit(EXIT_FAILURE);
}
if (format != AFMT_U8) {
fprintf(stderr, "bad sound format\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
if (ioctl(dsp_fd, SNDCTL_DSP_CHANNELS, &channels) == -1) {
perror(SOUND_DEV);
- exit(1);
+ exit(EXIT_FAILURE);
}
if (channels != 1) {
fprintf(stderr, "bad channels\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
/* End sound fix from Torbjorn Andersson (no dot thingies) */
ioctl(dsp_fd, SNDCTL_DSP_SYNC, 0);
if (mixer_fd >= 0)
ioctl(mixer_fd, SOUND_MIXER_WRITE_VOLUME, &old_volume);
- _exit(0);
+ _exit(EXIT_SUCCESS);
}
} else {
os_reset_screen();
ux_blorb_stop();
- exit(1);
+ exit(EXIT_FAILURE);
}
}
fputs ("\n\n", stderr);
- exit (1);
+ exit (EXIT_FAILURE);
} /* os_fatal */
/* extern char script_name[]; */
#ifndef WIN32
if ((getuid() == 0) || (geteuid() == 0)) {
printf("I won't run as root!\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
#endif
if ((home = getenv(HOMEDIR)) == NULL) {
printf("Hard drive on fire!\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
case 'S': f_setup.script_cols = atoi(zoptarg); break;
case 't': u_setup.tandy_bit = 1; break;
case 'u': f_setup.undo_slots = atoi(zoptarg); break;
- case 'v': print_version(); exit(0); break;
+ case 'v': print_version(); exit(EXIT_SUCCESS); break;
case 'w': u_setup.screen_width = atoi(zoptarg); break;
case 'x': f_setup.expand_abbreviations = 1; break;
case 'Z':
puts (INFORMATION);
puts (INFO2);
- exit (0);
+ exit (EXIT_SUCCESS);
}
/* This section is exceedingly messy and really can't be fixed
if (initscr() == NULL) { /* Set up curses */
os_fatal("Unable to initialize curses. Maybe your $TERM setting is bad.");
- exit(1);
+ exit(EXIT_FAILURE);
}
u_setup.curses_active = 1; /* Let os_fatal know curses is running */
raw(); /* Raw input mode, no line processing */
refresh();
endwin();
}
- exit(1);
+ exit(EXIT_FAILURE);
} /* os_quit */
if (zoptind != argc - 1) {
printf("FROTZ V%s\tMSDOS / PCDOS Edition\n", VERSION);
puts(information);
- exit(EXIT_FAILURE);
+ exit(EXIT_SUCCESS);
}
/* Set the story file name */