From 132e514dea3bda9c723b9cf04d6570fecc654fd5 Mon Sep 17 00:00:00 2001 From: ellson Date: Tue, 27 Jun 2006 12:43:47 +0000 Subject: [PATCH] rename panic() to panic1() because of conflict on Darwin with /usr/include/mach/mach.h:79 --- cmd/lefty/aix_mods/common.h | 2 +- cmd/lefty/aix_mods/exec.c | 8 ++++---- cmd/lefty/aix_mods/tbl.c | 32 ++++++++++++++++---------------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/cmd/lefty/aix_mods/common.h b/cmd/lefty/aix_mods/common.h index 28a7adc9e..5c9943804 100644 --- a/cmd/lefty/aix_mods/common.h +++ b/cmd/lefty/aix_mods/common.h @@ -83,7 +83,7 @@ extern "C" { char *buildpath(char *, int); char *buildcommand(char *, char *, int, int, char *); void warning(char *, int, char *, char *, ...); - void panic(char *, int, char *, char *, ...); + void panic1(char *, int, char *, char *, ...); void panic2(char *, int, char *, char *, ...); #endif /* _COMMON_H */ diff --git a/cmd/lefty/aix_mods/exec.c b/cmd/lefty/aix_mods/exec.c index eb776d243..a806345fc 100644 --- a/cmd/lefty/aix_mods/exec.c +++ b/cmd/lefty/aix_mods/exec.c @@ -175,7 +175,7 @@ Tobj Eunit(Tobj co) return NULL; if (Tgettype(co) != T_CODE) - panic(POS, "Eunit", "argument type is not T_CODE"); + panic1(POS, "Eunit", "argument type is not T_CODE"); m = Mpushmark(co); PUSHJMP(oeljbufp, eljbufp, eljbuf); @@ -414,7 +414,7 @@ static Tobj eeval(Tobj co, int ci) /* NOT REACHED */ break; default: - panic(POS, "eeval", "unknown program token type %d", ctype); + panic1(POS, "eeval", "unknown program token type %d", ctype); } return v1o; } @@ -480,7 +480,7 @@ static Tobj efcall(Tobj co, int ci) sinfop[ownsinfoi].fco = fdo; sinfop[ownsinfoi].fci = bi; if (fid < 0 || fid >= Ifuncn) - panic(POS, "efcall", "no such internal function: %d", fid); + panic1(POS, "efcall", "no such internal function: %d", fid); rtno = Ttrue; if ((*Ifuncs[fid].func) (i, &lvarp[flvari]) == L_FAILURE) { rtno = NULL; @@ -876,7 +876,7 @@ static int orderop(Tobj v1o, Ctype_t op, Tobj v2o) case C_GE: return (r >= 0) ? TRUE : FALSE; } - panic(POS, "orderop", "bad op code"); + panic1(POS, "orderop", "bad op code"); return FALSE; /* NOT REACHED */ } diff --git a/cmd/lefty/aix_mods/tbl.c b/cmd/lefty/aix_mods/tbl.c index 6d4d5d8de..cd4fb8b52 100644 --- a/cmd/lefty/aix_mods/tbl.c +++ b/cmd/lefty/aix_mods/tbl.c @@ -224,7 +224,7 @@ void Tinsi(Tobj to, long ik, Tobj vo) long tm; if (!to || !T_ISTABLE(to)) - panic(POS, "Tinsi", "insert attempted on non-table"); + panic1(POS, "Tinsi", "insert attempted on non-table"); tm = Mpushmark(to); if (vo) Mpushmark(vo); @@ -238,7 +238,7 @@ void Tinsr(Tobj to, double rk, Tobj vo) long tm; if (!to || !T_ISTABLE(to)) - panic(POS, "Tinsr", "insert attempted on non-table"); + panic1(POS, "Tinsr", "insert attempted on non-table"); tm = Mpushmark(to); if (vo) Mpushmark(vo); @@ -252,7 +252,7 @@ void Tinss(Tobj to, char *sk, Tobj vo) long tm; if (!to || !T_ISTABLE(to)) - panic(POS, "Tinss", "insert attempted on non-table"); + panic1(POS, "Tinss", "insert attempted on non-table"); tm = Mpushmark(to); if (vo) Mpushmark(vo); @@ -265,9 +265,9 @@ void Tinso(Tobj to, Tobj ko, Tobj vo) long tm; if (!to || !T_ISTABLE(to)) - panic(POS, "Tinso", "insert attempted on non-table"); + panic1(POS, "Tinso", "insert attempted on non-table"); if (!ko || !(T_ISINTEGER(ko) || T_ISREAL(ko) || T_ISSTRING(ko))) - panic(POS, "Tinso", "bad key"); + panic1(POS, "Tinso", "bad key"); tm = Mpushmark(to); Mpushmark(ko); if (vo) @@ -281,7 +281,7 @@ Tobj Tfindi(Tobj to, long ik) if (!to) return NULL; if (!T_ISTABLE(to)) - panic(POS, "Tfindi", "find attempted on non-table"); + panic1(POS, "Tfindi", "find attempted on non-table"); keyi.i = ik; return find(to, &keyi, NULL); } @@ -291,7 +291,7 @@ Tobj Tfindr(Tobj to, double rk) if (!to) return NULL; if (!T_ISTABLE(to)) - panic(POS, "Tfindr", "find attempted on non-table"); + panic1(POS, "Tfindr", "find attempted on non-table"); keyr.d = rk; return find(to, &keyr, NULL); } @@ -301,7 +301,7 @@ Tobj Tfinds(Tobj to, char *sk) if (!to) return NULL; if (!T_ISTABLE(to)) - panic(POS, "Tfinds", "find attempted on non-table"); + panic1(POS, "Tfinds", "find attempted on non-table"); return find(to, &keys, sk); } @@ -310,9 +310,9 @@ Tobj Tfindo(Tobj to, Tobj ko) if (!to || !ko) return NULL; if (!T_ISTABLE(to)) - panic(POS, "Tfindo", "find attempted on non-table"); + panic1(POS, "Tfindo", "find attempted on non-table"); if (!(T_ISINTEGER(ko) || T_ISREAL(ko) || T_ISSTRING(ko))) - panic(POS, "Tfindo", "bad key"); + panic1(POS, "Tfindo", "bad key"); return find(to, ko, NULL); } @@ -321,7 +321,7 @@ void Tdeli(Tobj to, long ik) if (!to) return; if (!T_ISTABLE(to)) - panic(POS, "Tdeli", "delete attempted on non-table"); + panic1(POS, "Tdeli", "delete attempted on non-table"); keyi.i = ik; delete(to, &keyi, NULL); } @@ -331,7 +331,7 @@ void Tdelr(Tobj to, double rk) if (!to) return; if (!T_ISTABLE(to)) - panic(POS, "Tdelr", "delete attempted on non-table"); + panic1(POS, "Tdelr", "delete attempted on non-table"); keyr.d = rk; delete(to, &keyr, NULL); } @@ -341,7 +341,7 @@ void Tdels(Tobj to, char *sk) if (!to) return; if (!T_ISTABLE(to)) - panic(POS, "Tdels", "delete attempted on non-table"); + panic1(POS, "Tdels", "delete attempted on non-table"); delete(to, &keys, sk); } @@ -350,9 +350,9 @@ void Tdelo(Tobj to, Tobj ko) if (!to || !ko) return; if (!T_ISTABLE(to)) - panic(POS, "Tdelo", "delete attempted on non-table"); + panic1(POS, "Tdelo", "delete attempted on non-table"); if (!(T_ISINTEGER(ko) || T_ISREAL(ko) || T_ISSTRING(ko))) - panic(POS, "Tdelo", "bad key"); + panic1(POS, "Tdelo", "bad key"); delete(to, ko, NULL); } @@ -703,7 +703,7 @@ static void mapinsert(Tobj fmo, Tobj too) lp = &map.list[(unsigned long) fmo % MAPLISTN]; if (!(cep = Mallocate(MAPENTRYSIZE))) - panic(POS, "mapinsert", "cannot allocate mapentry"); + panic1(POS, "mapinsert", "cannot allocate mapentry"); cep->fmo = fmo, cep->too = too; cep->next = *lp, *lp = cep; } -- 2.40.0