Changed all error return codes

This commit is contained in:
Michiel Broek
2002-10-20 20:58:55 +00:00
parent 1d819c9201
commit 02a1621f62
73 changed files with 2103 additions and 2022 deletions

View File

@@ -80,7 +80,7 @@ m_marea.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/u
m_new.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h stlist.h m_global.h grlist.h m_new.h m_lang.h m_marea.h m_ngroup.h
m_protocol.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h ../paths.h screen.h mutil.h ledit.h stlist.h m_global.h m_protocol.h
m_ticarea.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h stlist.h grlist.h m_global.h m_node.h m_fgroup.h m_farea.h m_archive.h m_ticarea.h
mbsetup.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h m_global.h m_bbs.h m_farea.h m_fgroup.h m_mail.h m_mgroup.h m_hatch.h m_tic.h m_ticarea.h m_magic.h m_fido.h m_lang.h m_archive.h m_virus.h m_tty.h m_limits.h m_users.h m_node.h m_fdb.h m_new.h m_ol.h m_bbslist.h m_safe.h m_protocol.h m_ff.h m_modem.h m_marea.h m_ngroup.h m_service.h m_domain.h m_task.h m_route.h
mbsetup.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/mberrors.h screen.h mutil.h ledit.h m_global.h m_bbs.h m_farea.h m_fgroup.h m_mail.h m_mgroup.h m_hatch.h m_tic.h m_ticarea.h m_magic.h m_fido.h m_lang.h m_archive.h m_virus.h m_tty.h m_limits.h m_users.h m_node.h m_fdb.h m_new.h m_ol.h m_bbslist.h m_safe.h m_protocol.h m_ff.h m_modem.h m_marea.h m_ngroup.h m_service.h m_domain.h m_task.h m_route.h
ledit.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h screen.h mutil.h ledit.h
m_farea.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h m_global.h m_fgroup.h m_archive.h m_farea.h m_fgroup.h m_ngroup.h
m_fido.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h stlist.h m_global.h m_fido.h
@@ -89,10 +89,10 @@ m_menu.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/us
m_ngroup.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h stlist.h m_global.h m_ngroup.h
m_service.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h stlist.h m_global.h m_service.h
m_tty.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h stlist.h m_modem.h m_global.h m_tty.h
mutil.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h
mutil.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/common.h ../lib/clcomm.h ../lib/mberrors.h screen.h mutil.h
m_archive.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../paths.h screen.h mutil.h ledit.h stlist.h m_global.h m_archive.h
m_fdb.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h m_global.h m_farea.h m_fdb.h
m_global.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h m_node.h m_marea.h m_ticarea.h m_new.h m_global.h
m_global.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/mberrors.h screen.h mutil.h ledit.h m_node.h m_marea.h m_ticarea.h m_new.h m_global.h
m_magic.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h stlist.h m_ticarea.h m_global.h m_magic.h
m_mgroup.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h stlist.h m_global.h m_node.h m_marea.h m_mgroup.h
m_node.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h screen.h mutil.h ledit.h grlist.h stlist.h m_global.h m_lang.h m_ticarea.h m_marea.h m_node.h

View File

@@ -36,6 +36,7 @@
#include "../lib/records.h"
#include "../lib/common.h"
#include "../lib/clcomm.h"
#include "../lib/mberrors.h"
#include "screen.h"
#include "mutil.h"
#include "ledit.h"
@@ -69,7 +70,7 @@ void config_check(char *path)
if (some_fd == -1) {
perror("");
fprintf(stderr, "Fatal, %s/etc/config.data not found, is mbtask running?\n", path);
exit(1);
exit(MBERR_CONFIG_ERROR);
}
close(some_fd);
}

View File

@@ -36,6 +36,7 @@
#include "../lib/records.h"
#include "../lib/common.h"
#include "../lib/clcomm.h"
#include "../lib/mberrors.h"
#include "screen.h"
#include "mutil.h"
#include "ledit.h"
@@ -130,7 +131,7 @@ static void die(int onsig)
WriteError("MBSETUP finished on signal %s", SigName[onsig]);
else
Syslog(' ', "MBSETUP finished");
ExitClient(0);
ExitClient(onsig);
}
@@ -395,7 +396,7 @@ int main(int argc, char *argv[])
pw = getpwuid(geteuid());
if (strcmp(pw->pw_name, (char *)"mbse")) {
printf("ERROR: only user \"mbse\" may use this program\n");
exit(1);
exit(MBERR_INIT_ERROR);
}
#ifdef MEMWATCH
@@ -534,7 +535,7 @@ int main(int argc, char *argv[])
} while (loop == 1);
}
die(0);
die(MBERR_OK);
return 0;
}

View File

@@ -34,6 +34,7 @@
#include "../lib/structs.h"
#include "../lib/common.h"
#include "../lib/clcomm.h"
#include "../lib/mberrors.h"
#include "screen.h"
#include "mutil.h"
@@ -46,7 +47,7 @@ unsigned char readkey(int y, int x, int fg, int bg)
if ((ttyfd = open("/dev/tty", O_RDWR|O_NONBLOCK)) < 0) {
perror("open 9");
exit(1);
exit(MBERR_TTYIO_ERROR);
}
Setraw();
@@ -88,7 +89,7 @@ unsigned char testkey(int y, int x)
if ((ttyfd = open("/dev/tty", O_RDWR|O_NONBLOCK)) < 0) {
perror("open 9");
exit(1);
exit(MBERR_TTYIO_ERROR);
}
Setraw();