2 * IRC - Internet Relay Chat, ircd/s_err.c
3 * Copyright (C) 1992 Darren Reed
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 1, or (at your option)
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 static Numeric replyTable[] = {
33 { RPL_WELCOME, ":Welcome to the Internet Relay Network %s", "001" },
35 { RPL_YOURHOST, ":Your host is %s, running version %s", "002" },
37 { RPL_CREATED, ":This server was created %s", "003" },
39 { RPL_MYINFO, "%s %s dioswkgx Abiklmnopstuvr Abklouv", "004" },
41 { RPL_ISUPPORT, "%s :are supported by this server", "005" },
47 { RPL_SNOMASK, "%d :: Server notice mask (%#x)", "008" },
49 { RPL_STATMEMTOT, "%u %u :Bytes Blocks", "009" },
52 { RPL_STATMEM, "%u %u %s %u", "010" },
54 { RPL_STATMEM, "%u %u %s", "010" },
65 { RPL_MAP, ":%s%s%s %s [%i clients]", "015" },
67 { RPL_MAPMORE, ":%s%s --> *more*", "016" },
69 { RPL_MAPEND, ":End of /MAP", "017" },
95 { RPL_APASSWARN, ":%s%s%s%s%s", "030" },
435 { RPL_TRACELINK, "Link %s.%s %s %s", "200" },
437 { RPL_TRACECONNECTING, "Try. %s %s", "201" },
439 { RPL_TRACEHANDSHAKE, "H.S. %s %s", "202" },
441 { RPL_TRACEUNKNOWN, "???? %s %s", "203" },
443 { RPL_TRACEOPERATOR, "Oper %s %s %ld", "204" },
445 { RPL_TRACEUSER, "User %s %s %ld", "205" },
447 { RPL_TRACESERVER, "Serv %s %dS %dC %s %s!%s@%s %ld %ld", "206" },
451 { RPL_TRACENEWTYPE, "<newtype> 0 %s", "208" },
453 { RPL_TRACECLASS, "Class %s %d", "209" },
457 { RPL_STATSLINKINFO, 0, "211" },
459 { RPL_STATSCOMMANDS, "%s %u %u", "212" },
461 { RPL_STATSCLINE, "%c %s * %s %d %d", "213" },
463 { RPL_STATSNLINE, "%c %s * %s %d %d", "214" },
465 { RPL_STATSILINE, "%c %s %s %s %d %s", "215" },
467 { RPL_STATSKLINE, "%c %s \"%s\" %s 0 0", "216" },
469 { RPL_STATSPLINE, "P %d %d %s %s", "217" },
471 { RPL_STATSYLINE, "%c %s %d %d %d %ld %d", "218" },
473 { RPL_ENDOFSTATS, "%c :End of /STATS report", "219" },
477 { RPL_UMODEIS, "%s", "221" },
497 { RPL_SERVICEINFO, 0, "231" },
499 { RPL_ENDOFSERVICES, 0, "232" },
501 { RPL_SERVICE, 0, "233" },
503 { RPL_SERVLIST, 0, "234" },
505 { RPL_SERVLISTEND, 0, "235" },
507 { RPL_STATSVERBOSE, "V :Sent as explicit", "236" },
509 { RPL_STATSENGINE, "%s :Event loop engine", "237" },
511 { RPL_STATSFLINE, "%c %s %s", "238" },
517 { RPL_STATSLLINE, "%c %s * %s %d %d", "241" },
519 { RPL_STATSUPTIME, ":Server Up %d days, %d:%02d:%02d", "242" },
521 { RPL_STATSOLINE, "%c %s * %s %d %d", "243" },
523 { RPL_STATSHLINE, "%c %s * %s %d %d", "244" },
527 { RPL_STATSTLINE, "%c %s %s", "246" },
529 { RPL_STATSGLINE, "%c %s@%s %Tu :%s", "247" },
531 { RPL_STATSULINE, "%c %s %s %s %d %d", "248" },
533 { RPL_STATSDEBUG, 0, "249" },
535 { RPL_STATSCONN, ":Highest connection count: %d (%d clients)", "250" },
537 { RPL_LUSERCLIENT, ":There are %d users and %d invisible on %d servers", "251" },
539 { RPL_LUSEROP, "%d :operator(s) online", "252" },
541 { RPL_LUSERUNKNOWN, "%d :unknown connection(s)", "253" },
543 { RPL_LUSERCHANNELS, "%d :channels formed", "254" },
545 { RPL_LUSERME, ":I have %d clients and %d servers", "255" },
547 { RPL_ADMINME, ":Administrative info about %s", "256" },
549 { RPL_ADMINLOC1, ":%s", "257" },
551 { RPL_ADMINLOC2, ":%s", "258" },
553 { RPL_ADMINEMAIL, ":%s", "259" },
557 { RPL_TRACELOG, "File %s %d", "261" },
559 { RPL_TRACEPING, "Ping %s %s", "262" },
575 { RPL_PRIVS, "%s :", "270" },
577 { RPL_SILELIST, "%s %s", "271" },
579 { RPL_ENDOFSILELIST, "%s :End of Silence List", "272" },
585 { RPL_STATSDLINE, "%c %s %s", "275" },
595 { RPL_GLIST, "%s%s%s %Tu %s %c :%s", "280" },
597 { RPL_ENDOFGLIST, ":End of G-line List", "281" },
599 { RPL_JUPELIST, "%s %Tu %s %c :%s", "282" },
601 { RPL_ENDOFJUPELIST, ":End of Jupe List", "283" },
603 { RPL_FEATURE, 0, "284" },
635 { RPL_NONE, 0, "300" },
637 { RPL_AWAY, "%s :%s", "301" },
639 { RPL_USERHOST, ":", "302" },
641 { RPL_ISON, ":", "303" },
643 { RPL_TEXT, 0, "304" },
645 { RPL_UNAWAY, ":You are no longer marked as being away", "305" },
647 { RPL_NOWAWAY, ":You have been marked as being away", "306" },
657 { RPL_WHOISUSER, "%s %s %s * :%s", "311" },
659 { RPL_WHOISSERVER, "%s %s :%s", "312" },
661 { RPL_WHOISOPERATOR, "%s :is an IRC Operator", "313" },
663 { RPL_WHOWASUSER, "%s %s %s * :%s", "314" },
665 { RPL_ENDOFWHO, "%s :End of /WHO list.", "315" },
669 { RPL_WHOISIDLE, "%s %ld %ld :seconds idle, signon time", "317" },
671 { RPL_ENDOFWHOIS, "%s :End of /WHOIS list.", "318" },
673 { RPL_WHOISCHANNELS, "%s :%s", "319" },
677 { RPL_LISTSTART, "Channel :Users Name", "321" },
679 { RPL_LIST, "%s %d :%s", "322" },
681 { RPL_LISTEND, ":End of /LIST", "323" },
683 { RPL_CHANNELMODEIS, "%s %s %s", "324" },
693 { RPL_CREATIONTIME, "%s %Tu", "329" },
695 { RPL_WHOISACCOUNT, "%s %s :is logged in as", "330" },
697 { RPL_NOTOPIC, "%s :No topic is set.", "331" },
699 { RPL_TOPIC, "%s :%s", "332" },
701 { RPL_TOPICWHOTIME, "%s %s %Tu", "333" },
703 { RPL_LISTUSAGE, ":%s", "334" },
711 { RPL_WHOISACTUALLY, ":%s is actually %s@%s [%s]", "338" },
715 { RPL_USERIP, ":", "340" },
717 { RPL_INVITING, "%s %s", "341" },
727 { RPL_INVITELIST, ":%s", "346" },
729 { RPL_ENDOFINVITELIST, ":End of Invite List", "347" },
737 { RPL_VERSION, "%s.%s %s :%s", "351" },
739 { RPL_WHOREPLY, "%s", "352" },
741 { RPL_NAMREPLY, "%s", "353" },
743 { RPL_WHOSPCRPL, "%s", "354" },
757 { RPL_KILLDONE, 0, "361" }, /* Not used */
759 { RPL_CLOSING, "%s :Operator enforced Close", "362" },
761 { RPL_CLOSEEND, "%d :Connections Closed", "363" },
763 { RPL_LINKS, "%s %s :%d P%u %s", "364" },
765 { RPL_ENDOFLINKS, "%s :End of /LINKS list.", "365" },
767 { RPL_ENDOFNAMES, "%s :End of /NAMES list.", "366" },
769 { RPL_BANLIST, "%s %s %s %Tu", "367" },
771 { RPL_ENDOFBANLIST, "%s :End of Channel Ban List", "368" },
773 { RPL_ENDOFWHOWAS, "%s :End of WHOWAS", "369" },
777 { RPL_INFO, ":%s", "371" },
779 { RPL_MOTD, ":- %s", "372" },
781 { RPL_INFOSTART, ":Server INFO", "373" },
783 { RPL_ENDOFINFO, ":End of /INFO list.", "374" },
785 { RPL_MOTDSTART, ":- %s Message of the Day - ", "375" },
787 { RPL_ENDOFMOTD, ":End of /MOTD command.", "376" },
797 { RPL_YOUREOPER, ":You are now an IRC Operator", "381" },
799 { RPL_REHASHING, "%s :Rehashing", "382" },
803 { RPL_MYPORTIS, "%d :Port to local server is", "384" }, /* not used */
805 { RPL_NOTOPERANYMORE, 0, "385" }, /* not used */
817 { RPL_TIME, "%s %Tu %ld :%s", "391" },
835 { ERR_FIRSTERROR, "", "400" },
837 { ERR_NOSUCHNICK, "%s :No such nick", "401" },
839 { ERR_NOSUCHSERVER, "%s :No such server", "402" },
841 { ERR_NOSUCHCHANNEL, "%s :No such channel", "403" },
843 { ERR_CANNOTSENDTOCHAN, "%s :Cannot send to channel", "404" },
845 { ERR_TOOMANYCHANNELS, "%s :You have joined too many channels", "405" },
847 { ERR_WASNOSUCHNICK, "%s :There was no such nickname", "406" },
849 { ERR_TOOMANYTARGETS, "%s :Duplicate recipients. No message delivered", "407" },
853 { ERR_NOORIGIN, ":No origin specified", "409" },
857 { ERR_NORECIPIENT, ":No recipient given (%s)", "411" },
859 { ERR_NOTEXTTOSEND, ":No text to send", "412" },
861 { ERR_NOTOPLEVEL, "%s :No toplevel domain specified", "413" },
863 { ERR_WILDTOPLEVEL, "%s :Wildcard in toplevel Domain", "414" },
867 { ERR_QUERYTOOLONG, "%s :Too many lines in the output, restrict your query", "416" },
877 { ERR_UNKNOWNCOMMAND, "%s :Unknown command", "421" },
879 { ERR_NOMOTD, ":MOTD File is missing", "422" },
881 { ERR_NOADMININFO, "%s :No administrative info available", "423" },
897 { ERR_NONICKNAMEGIVEN, ":No nickname given", "431" },
899 { ERR_ERRONEUSNICKNAME, "%s :Erroneous Nickname", "432" },
901 { ERR_NICKNAMEINUSE, "%s :Nickname is already in use.", "433" },
907 { ERR_NICKCOLLISION, "%s :Nickname collision KILL", "436" },
909 { ERR_BANNICKCHANGE, "%s :Cannot change nickname while banned on channel", "437" },
911 { ERR_NICKTOOFAST, "%s :Nick change too fast. Please wait %d seconds.", "438" },
913 { ERR_TARGETTOOFAST, "%s :Target change too fast. Please wait %d seconds.", "439" },
917 { ERR_USERNOTINCHANNEL, "%s %s :They aren't on that channel", "441" },
919 { ERR_NOTONCHANNEL, "%s :You're not on that channel", "442" },
921 { ERR_USERONCHANNEL, "%s %s :is already on channel", "443" },
937 { ERR_NOTREGISTERED, ":You have not registered", "451" },
957 { ERR_NEEDMOREPARAMS, "%s :Not enough parameters", "461" },
959 { ERR_ALREADYREGISTRED, ":You may not reregister", "462" },
961 { ERR_NOPERMFORHOST, ":Your host isn't among the privileged", "463" },
963 { ERR_PASSWDMISMATCH, ":Password Incorrect", "464" },
965 { ERR_YOUREBANNEDCREEP, ":You are banned from this server", "465" },
967 { ERR_YOUWILLBEBANNED, "", "466" },
969 { ERR_KEYSET, "%s :Channel key already set", "467" },
971 { ERR_INVALIDUSERNAME, 0, "468" },
977 { ERR_CHANNELISFULL, "%s :Cannot join channel (+l)", "471" },
979 { ERR_UNKNOWNMODE, "%c :is unknown mode char to me", "472" },
981 { ERR_INVITEONLYCHAN, "%s :Cannot join channel (+i)", "473" },
983 { ERR_BANNEDFROMCHAN, "%s :Cannot join channel (+b)", "474" },
985 { ERR_BADCHANNELKEY, "%s :Cannot join channel (+k)", "475" },
987 { ERR_BADCHANMASK, "%s :Bad Channel Mask", "476" },
989 { ERR_NEEDREGGEDNICK, "%s :Cannot join channel (+r)", "477" },
991 { ERR_BANLISTFULL, "%s %s :Channel ban/ignore list is full", "478" },
993 { ERR_BADCHANNAME, "%s :Cannot join channel (access denied on this server)", "479" },
997 { ERR_NOPRIVILEGES, ":Permission Denied: You're not an IRC operator", "481" },
999 { ERR_CHANOPRIVSNEEDED, "%s :You're not channel operator", "482" },
1001 { ERR_CANTKILLSERVER, ":You cant kill a server!", "483" },
1003 { ERR_ISCHANSERVICE, "%s %s :Cannot kill, kick or deop a network service", "484" },
1013 { ERR_VOICENEEDED, "%s :You're neither voiced nor channel operator", "489" },
1017 { ERR_NOOPERHOST, ":No O-lines for your host", "491" },
1021 { ERR_NOFEATURE, "%s :No such feature", "493" },
1023 { ERR_BADFEATVALUE, "%s :Bad value for feature %s", "494" },
1025 { ERR_BADLOGTYPE, "%s :No such log type", "495" },
1027 { ERR_BADLOGSYS, "%s :No such log subsystem", "496" },
1029 { ERR_BADLOGVALUE, "%s :Bad value for log type", "497" },
1031 { ERR_ISOPERLCHAN, "%s %s :Cannot kick or deop an IRC Operator on a local channel", "498" },
1037 { ERR_UMODEUNKNOWNFLAG, ":Unknown MODE flag", "501" },
1039 { ERR_USERSDONTMATCH, ":Cant change mode for other users", "502" },
1057 { ERR_SILELISTFULL, "%s :Your silence list is full", "511" },
1059 { ERR_NOSUCHGLINE, "%s :No such gline", "512" },
1061 { ERR_BADPING, 0, "513" },
1063 { ERR_NOSUCHJUPE, "%s :No such jupe", "514" },
1065 { ERR_BADEXPIRE, "%Tu :Bad expire time", "515" },
1067 { ERR_DONTCHEAT, " :Don't Cheat.", "516" },
1069 { ERR_DISABLED, "%s :Command disabled.", "517" },
1071 { ERR_LONGMASK, " :Mask is too long", "518" },
1073 { ERR_TOOMANYUSERS, "%d :Too many users affected by mask", "519" },
1075 { ERR_MASKTOOWIDE, "%s :Mask is too wide", "520" },
1135 { ERR_NOTLOWEROPLEVEL, "%s %s %hu %hu :Cannot %s someone with %s op-level", "550" },
1137 { ERR_NOTMANAGER, "%s :You must be channel Admin to add or remove a password. %s %s %s", "551" },
1139 { ERR_CHANSECURED, "%s :Channel is older than 48 hours and secured. Cannot change Admin pass anymore", "552" },
1141 { ERR_UPASSSET, "%s :Cannot remove Admin pass (+A) while User pass (+u) is still set. First use /MODE %s -u <userpass>", "553" },
1143 { ERR_UPASSNOTSET, "%s :Cannot set user pass (+u) while Admin pass (+A) is not set. First use /MODE %s +A <adminpass>", "554" },
1236 const struct Numeric* get_error_numeric(int n)
1239 assert(n < ERR_LASTERROR);
1240 assert(0 != replyTable[n].value);
1242 return &replyTable[n];
1245 static char numbuff[512];
1249 static const char atoi_tab[4000] = {
1250 '0','0','0',0, '0','0','1',0, '0','0','2',0, '0','0','3',0, '0','0','4',0,
1251 '0','0','5',0, '0','0','6',0, '0','0','7',0, '0','0','8',0, '0','0','9',0,
1252 '0','1','0',0, '0','1','1',0, '0','1','2',0, '0','1','3',0, '0','1','4',0,
1253 '0','1','5',0, '0','1','6',0, '0','1','7',0, '0','1','8',0, '0','1','9',0,
1254 '0','2','0',0, '0','2','1',0, '0','2','2',0, '0','2','3',0, '0','2','4',0,
1255 '0','2','5',0, '0','2','6',0, '0','2','7',0, '0','2','8',0, '0','2','9',0,
1256 '0','3','0',0, '0','3','1',0, '0','3','2',0, '0','3','3',0, '0','3','4',0,
1257 '0','3','5',0, '0','3','6',0, '0','3','7',0, '0','3','8',0, '0','3','9',0,
1258 '0','4','0',0, '0','4','1',0, '0','4','2',0, '0','4','3',0, '0','4','4',0,
1259 '0','4','5',0, '0','4','6',0, '0','4','7',0, '0','4','8',0, '0','4','9',0,
1260 '0','5','0',0, '0','5','1',0, '0','5','2',0, '0','5','3',0, '0','5','4',0,
1261 '0','5','5',0, '0','5','6',0, '0','5','7',0, '0','5','8',0, '0','5','9',0,
1262 '0','6','0',0, '0','6','1',0, '0','6','2',0, '0','6','3',0, '0','6','4',0,
1263 '0','6','5',0, '0','6','6',0, '0','6','7',0, '0','6','8',0, '0','6','9',0,
1264 '0','7','0',0, '0','7','1',0, '0','7','2',0, '0','7','3',0, '0','7','4',0,
1265 '0','7','5',0, '0','7','6',0, '0','7','7',0, '0','7','8',0, '0','7','9',0,
1266 '0','8','0',0, '0','8','1',0, '0','8','2',0, '0','8','3',0, '0','8','4',0,
1267 '0','8','5',0, '0','8','6',0, '0','8','7',0, '0','8','8',0, '0','8','9',0,
1268 '0','9','0',0, '0','9','1',0, '0','9','2',0, '0','9','3',0, '0','9','4',0,
1269 '0','9','5',0, '0','9','6',0, '0','9','7',0, '0','9','8',0, '0','9','9',0,
1270 '1','0','0',0, '1','0','1',0, '1','0','2',0, '1','0','3',0, '1','0','4',0,
1271 '1','0','5',0, '1','0','6',0, '1','0','7',0, '1','0','8',0, '1','0','9',0,
1272 '1','1','0',0, '1','1','1',0, '1','1','2',0, '1','1','3',0, '1','1','4',0,
1273 '1','1','5',0, '1','1','6',0, '1','1','7',0, '1','1','8',0, '1','1','9',0,
1274 '1','2','0',0, '1','2','1',0, '1','2','2',0, '1','2','3',0, '1','2','4',0,
1275 '1','2','5',0, '1','2','6',0, '1','2','7',0, '1','2','8',0, '1','2','9',0,
1276 '1','3','0',0, '1','3','1',0, '1','3','2',0, '1','3','3',0, '1','3','4',0,
1277 '1','3','5',0, '1','3','6',0, '1','3','7',0, '1','3','8',0, '1','3','9',0,
1278 '1','4','0',0, '1','4','1',0, '1','4','2',0, '1','4','3',0, '1','4','4',0,
1279 '1','4','5',0, '1','4','6',0, '1','4','7',0, '1','4','8',0, '1','4','9',0,
1280 '1','5','0',0, '1','5','1',0, '1','5','2',0, '1','5','3',0, '1','5','4',0,
1281 '1','5','5',0, '1','5','6',0, '1','5','7',0, '1','5','8',0, '1','5','9',0,
1282 '1','6','0',0, '1','6','1',0, '1','6','2',0, '1','6','3',0, '1','6','4',0,
1283 '1','6','5',0, '1','6','6',0, '1','6','7',0, '1','6','8',0, '1','6','9',0,
1284 '1','7','0',0, '1','7','1',0, '1','7','2',0, '1','7','3',0, '1','7','4',0,
1285 '1','7','5',0, '1','7','6',0, '1','7','7',0, '1','7','8',0, '1','7','9',0,
1286 '1','8','0',0, '1','8','1',0, '1','8','2',0, '1','8','3',0, '1','8','4',0,
1287 '1','8','5',0, '1','8','6',0, '1','8','7',0, '1','8','8',0, '1','8','9',0,
1288 '1','9','0',0, '1','9','1',0, '1','9','2',0, '1','9','3',0, '1','9','4',0,
1289 '1','9','5',0, '1','9','6',0, '1','9','7',0, '1','9','8',0, '1','9','9',0,
1290 '2','0','0',0, '2','0','1',0, '2','0','2',0, '2','0','3',0, '2','0','4',0,
1291 '2','0','5',0, '2','0','6',0, '2','0','7',0, '2','0','8',0, '2','0','9',0,
1292 '2','1','0',0, '2','1','1',0, '2','1','2',0, '2','1','3',0, '2','1','4',0,
1293 '2','1','5',0, '2','1','6',0, '2','1','7',0, '2','1','8',0, '2','1','9',0,
1294 '2','2','0',0, '2','2','1',0, '2','2','2',0, '2','2','3',0, '2','2','4',0,
1295 '2','2','5',0, '2','2','6',0, '2','2','7',0, '2','2','8',0, '2','2','9',0,
1296 '2','3','0',0, '2','3','1',0, '2','3','2',0, '2','3','3',0, '2','3','4',0,
1297 '2','3','5',0, '2','3','6',0, '2','3','7',0, '2','3','8',0, '2','3','9',0,
1298 '2','4','0',0, '2','4','1',0, '2','4','2',0, '2','4','3',0, '2','4','4',0,
1299 '2','4','5',0, '2','4','6',0, '2','4','7',0, '2','4','8',0, '2','4','9',0,
1300 '2','5','0',0, '2','5','1',0, '2','5','2',0, '2','5','3',0, '2','5','4',0,
1301 '2','5','5',0, '2','5','6',0, '2','5','7',0, '2','5','8',0, '2','5','9',0,
1302 '2','6','0',0, '2','6','1',0, '2','6','2',0, '2','6','3',0, '2','6','4',0,
1303 '2','6','5',0, '2','6','6',0, '2','6','7',0, '2','6','8',0, '2','6','9',0,
1304 '2','7','0',0, '2','7','1',0, '2','7','2',0, '2','7','3',0, '2','7','4',0,
1305 '2','7','5',0, '2','7','6',0, '2','7','7',0, '2','7','8',0, '2','7','9',0,
1306 '2','8','0',0, '2','8','1',0, '2','8','2',0, '2','8','3',0, '2','8','4',0,
1307 '2','8','5',0, '2','8','6',0, '2','8','7',0, '2','8','8',0, '2','8','9',0,
1308 '2','9','0',0, '2','9','1',0, '2','9','2',0, '2','9','3',0, '2','9','4',0,
1309 '2','9','5',0, '2','9','6',0, '2','9','7',0, '2','9','8',0, '2','9','9',0,
1310 '3','0','0',0, '3','0','1',0, '3','0','2',0, '3','0','3',0, '3','0','4',0,
1311 '3','0','5',0, '3','0','6',0, '3','0','7',0, '3','0','8',0, '3','0','9',0,
1312 '3','1','0',0, '3','1','1',0, '3','1','2',0, '3','1','3',0, '3','1','4',0,
1313 '3','1','5',0, '3','1','6',0, '3','1','7',0, '3','1','8',0, '3','1','9',0,
1314 '3','2','0',0, '3','2','1',0, '3','2','2',0, '3','2','3',0, '3','2','4',0,
1315 '3','2','5',0, '3','2','6',0, '3','2','7',0, '3','2','8',0, '3','2','9',0,
1316 '3','3','0',0, '3','3','1',0, '3','3','2',0, '3','3','3',0, '3','3','4',0,
1317 '3','3','5',0, '3','3','6',0, '3','3','7',0, '3','3','8',0, '3','3','9',0,
1318 '3','4','0',0, '3','4','1',0, '3','4','2',0, '3','4','3',0, '3','4','4',0,
1319 '3','4','5',0, '3','4','6',0, '3','4','7',0, '3','4','8',0, '3','4','9',0,
1320 '3','5','0',0, '3','5','1',0, '3','5','2',0, '3','5','3',0, '3','5','4',0,
1321 '3','5','5',0, '3','5','6',0, '3','5','7',0, '3','5','8',0, '3','5','9',0,
1322 '3','6','0',0, '3','6','1',0, '3','6','2',0, '3','6','3',0, '3','6','4',0,
1323 '3','6','5',0, '3','6','6',0, '3','6','7',0, '3','6','8',0, '3','6','9',0,
1324 '3','7','0',0, '3','7','1',0, '3','7','2',0, '3','7','3',0, '3','7','4',0,
1325 '3','7','5',0, '3','7','6',0, '3','7','7',0, '3','7','8',0, '3','7','9',0,
1326 '3','8','0',0, '3','8','1',0, '3','8','2',0, '3','8','3',0, '3','8','4',0,
1327 '3','8','5',0, '3','8','6',0, '3','8','7',0, '3','8','8',0, '3','8','9',0,
1328 '3','9','0',0, '3','9','1',0, '3','9','2',0, '3','9','3',0, '3','9','4',0,
1329 '3','9','5',0, '3','9','6',0, '3','9','7',0, '3','9','8',0, '3','9','9',0,
1330 '4','0','0',0, '4','0','1',0, '4','0','2',0, '4','0','3',0, '4','0','4',0,
1331 '4','0','5',0, '4','0','6',0, '4','0','7',0, '4','0','8',0, '4','0','9',0,
1332 '4','1','0',0, '4','1','1',0, '4','1','2',0, '4','1','3',0, '4','1','4',0,
1333 '4','1','5',0, '4','1','6',0, '4','1','7',0, '4','1','8',0, '4','1','9',0,
1334 '4','2','0',0, '4','2','1',0, '4','2','2',0, '4','2','3',0, '4','2','4',0,
1335 '4','2','5',0, '4','2','6',0, '4','2','7',0, '4','2','8',0, '4','2','9',0,
1336 '4','3','0',0, '4','3','1',0, '4','3','2',0, '4','3','3',0, '4','3','4',0,
1337 '4','3','5',0, '4','3','6',0, '4','3','7',0, '4','3','8',0, '4','3','9',0,
1338 '4','4','0',0, '4','4','1',0, '4','4','2',0, '4','4','3',0, '4','4','4',0,
1339 '4','4','5',0, '4','4','6',0, '4','4','7',0, '4','4','8',0, '4','4','9',0,
1340 '4','5','0',0, '4','5','1',0, '4','5','2',0, '4','5','3',0, '4','5','4',0,
1341 '4','5','5',0, '4','5','6',0, '4','5','7',0, '4','5','8',0, '4','5','9',0,
1342 '4','6','0',0, '4','6','1',0, '4','6','2',0, '4','6','3',0, '4','6','4',0,
1343 '4','6','5',0, '4','6','6',0, '4','6','7',0, '4','6','8',0, '4','6','9',0,
1344 '4','7','0',0, '4','7','1',0, '4','7','2',0, '4','7','3',0, '4','7','4',0,
1345 '4','7','5',0, '4','7','6',0, '4','7','7',0, '4','7','8',0, '4','7','9',0,
1346 '4','8','0',0, '4','8','1',0, '4','8','2',0, '4','8','3',0, '4','8','4',0,
1347 '4','8','5',0, '4','8','6',0, '4','8','7',0, '4','8','8',0, '4','8','9',0,
1348 '4','9','0',0, '4','9','1',0, '4','9','2',0, '4','9','3',0, '4','9','4',0,
1349 '4','9','5',0, '4','9','6',0, '4','9','7',0, '4','9','8',0, '4','9','9',0,
1350 '5','0','0',0, '5','0','1',0, '5','0','2',0, '5','0','3',0, '5','0','4',0,
1351 '5','0','5',0, '5','0','6',0, '5','0','7',0, '5','0','8',0, '5','0','9',0,
1352 '5','1','0',0, '5','1','1',0, '5','1','2',0, '5','1','3',0, '5','1','4',0,
1353 '5','1','5',0, '5','1','6',0, '5','1','7',0, '5','1','8',0, '5','1','9',0,
1354 '5','2','0',0, '5','2','1',0, '5','2','2',0, '5','2','3',0, '5','2','4',0,
1355 '5','2','5',0, '5','2','6',0, '5','2','7',0, '5','2','8',0, '5','2','9',0,
1356 '5','3','0',0, '5','3','1',0, '5','3','2',0, '5','3','3',0, '5','3','4',0,
1357 '5','3','5',0, '5','3','6',0, '5','3','7',0, '5','3','8',0, '5','3','9',0,
1358 '5','4','0',0, '5','4','1',0, '5','4','2',0, '5','4','3',0, '5','4','4',0,
1359 '5','4','5',0, '5','4','6',0, '5','4','7',0, '5','4','8',0, '5','4','9',0,
1360 '5','5','0',0, '5','5','1',0, '5','5','2',0, '5','5','3',0, '5','5','4',0,
1361 '5','5','5',0, '5','5','6',0, '5','5','7',0, '5','5','8',0, '5','5','9',0,
1362 '5','6','0',0, '5','6','1',0, '5','6','2',0, '5','6','3',0, '5','6','4',0,
1363 '5','6','5',0, '5','6','6',0, '5','6','7',0, '5','6','8',0, '5','6','9',0,
1364 '5','7','0',0, '5','7','1',0, '5','7','2',0, '5','7','3',0, '5','7','4',0,
1365 '5','7','5',0, '5','7','6',0, '5','7','7',0, '5','7','8',0, '5','7','9',0,
1366 '5','8','0',0, '5','8','1',0, '5','8','2',0, '5','8','3',0, '5','8','4',0,
1367 '5','8','5',0, '5','8','6',0, '5','8','7',0, '5','8','8',0, '5','8','9',0,
1368 '5','9','0',0, '5','9','1',0, '5','9','2',0, '5','9','3',0, '5','9','4',0,
1369 '5','9','5',0, '5','9','6',0, '5','9','7',0, '5','9','8',0, '5','9','9',0,
1370 '6','0','0',0, '6','0','1',0, '6','0','2',0, '6','0','3',0, '6','0','4',0,
1371 '6','0','5',0, '6','0','6',0, '6','0','7',0, '6','0','8',0, '6','0','9',0,
1372 '6','1','0',0, '6','1','1',0, '6','1','2',0, '6','1','3',0, '6','1','4',0,
1373 '6','1','5',0, '6','1','6',0, '6','1','7',0, '6','1','8',0, '6','1','9',0,
1374 '6','2','0',0, '6','2','1',0, '6','2','2',0, '6','2','3',0, '6','2','4',0,
1375 '6','2','5',0, '6','2','6',0, '6','2','7',0, '6','2','8',0, '6','2','9',0,
1376 '6','3','0',0, '6','3','1',0, '6','3','2',0, '6','3','3',0, '6','3','4',0,
1377 '6','3','5',0, '6','3','6',0, '6','3','7',0, '6','3','8',0, '6','3','9',0,
1378 '6','4','0',0, '6','4','1',0, '6','4','2',0, '6','4','3',0, '6','4','4',0,
1379 '6','4','5',0, '6','4','6',0, '6','4','7',0, '6','4','8',0, '6','4','9',0,
1380 '6','5','0',0, '6','5','1',0, '6','5','2',0, '6','5','3',0, '6','5','4',0,
1381 '6','5','5',0, '6','5','6',0, '6','5','7',0, '6','5','8',0, '6','5','9',0,
1382 '6','6','0',0, '6','6','1',0, '6','6','2',0, '6','6','3',0, '6','6','4',0,
1383 '6','6','5',0, '6','6','6',0, '6','6','7',0, '6','6','8',0, '6','6','9',0,
1384 '6','7','0',0, '6','7','1',0, '6','7','2',0, '6','7','3',0, '6','7','4',0,
1385 '6','7','5',0, '6','7','6',0, '6','7','7',0, '6','7','8',0, '6','7','9',0,
1386 '6','8','0',0, '6','8','1',0, '6','8','2',0, '6','8','3',0, '6','8','4',0,
1387 '6','8','5',0, '6','8','6',0, '6','8','7',0, '6','8','8',0, '6','8','9',0,
1388 '6','9','0',0, '6','9','1',0, '6','9','2',0, '6','9','3',0, '6','9','4',0,
1389 '6','9','5',0, '6','9','6',0, '6','9','7',0, '6','9','8',0, '6','9','9',0,
1390 '7','0','0',0, '7','0','1',0, '7','0','2',0, '7','0','3',0, '7','0','4',0,
1391 '7','0','5',0, '7','0','6',0, '7','0','7',0, '7','0','8',0, '7','0','9',0,
1392 '7','1','0',0, '7','1','1',0, '7','1','2',0, '7','1','3',0, '7','1','4',0,
1393 '7','1','5',0, '7','1','6',0, '7','1','7',0, '7','1','8',0, '7','1','9',0,
1394 '7','2','0',0, '7','2','1',0, '7','2','2',0, '7','2','3',0, '7','2','4',0,
1395 '7','2','5',0, '7','2','6',0, '7','2','7',0, '7','2','8',0, '7','2','9',0,
1396 '7','3','0',0, '7','3','1',0, '7','3','2',0, '7','3','3',0, '7','3','4',0,
1397 '7','3','5',0, '7','3','6',0, '7','3','7',0, '7','3','8',0, '7','3','9',0,
1398 '7','4','0',0, '7','4','1',0, '7','4','2',0, '7','4','3',0, '7','4','4',0,
1399 '7','4','5',0, '7','4','6',0, '7','4','7',0, '7','4','8',0, '7','4','9',0,
1400 '7','5','0',0, '7','5','1',0, '7','5','2',0, '7','5','3',0, '7','5','4',0,
1401 '7','5','5',0, '7','5','6',0, '7','5','7',0, '7','5','8',0, '7','5','9',0,
1402 '7','6','0',0, '7','6','1',0, '7','6','2',0, '7','6','3',0, '7','6','4',0,
1403 '7','6','5',0, '7','6','6',0, '7','6','7',0, '7','6','8',0, '7','6','9',0,
1404 '7','7','0',0, '7','7','1',0, '7','7','2',0, '7','7','3',0, '7','7','4',0,
1405 '7','7','5',0, '7','7','6',0, '7','7','7',0, '7','7','8',0, '7','7','9',0,
1406 '7','8','0',0, '7','8','1',0, '7','8','2',0, '7','8','3',0, '7','8','4',0,
1407 '7','8','5',0, '7','8','6',0, '7','8','7',0, '7','8','8',0, '7','8','9',0,
1408 '7','9','0',0, '7','9','1',0, '7','9','2',0, '7','9','3',0, '7','9','4',0,
1409 '7','9','5',0, '7','9','6',0, '7','9','7',0, '7','9','8',0, '7','9','9',0,
1410 '8','0','0',0, '8','0','1',0, '8','0','2',0, '8','0','3',0, '8','0','4',0,
1411 '8','0','5',0, '8','0','6',0, '8','0','7',0, '8','0','8',0, '8','0','9',0,
1412 '8','1','0',0, '8','1','1',0, '8','1','2',0, '8','1','3',0, '8','1','4',0,
1413 '8','1','5',0, '8','1','6',0, '8','1','7',0, '8','1','8',0, '8','1','9',0,
1414 '8','2','0',0, '8','2','1',0, '8','2','2',0, '8','2','3',0, '8','2','4',0,
1415 '8','2','5',0, '8','2','6',0, '8','2','7',0, '8','2','8',0, '8','2','9',0,
1416 '8','3','0',0, '8','3','1',0, '8','3','2',0, '8','3','3',0, '8','3','4',0,
1417 '8','3','5',0, '8','3','6',0, '8','3','7',0, '8','3','8',0, '8','3','9',0,
1418 '8','4','0',0, '8','4','1',0, '8','4','2',0, '8','4','3',0, '8','4','4',0,
1419 '8','4','5',0, '8','4','6',0, '8','4','7',0, '8','4','8',0, '8','4','9',0,
1420 '8','5','0',0, '8','5','1',0, '8','5','2',0, '8','5','3',0, '8','5','4',0,
1421 '8','5','5',0, '8','5','6',0, '8','5','7',0, '8','5','8',0, '8','5','9',0,
1422 '8','6','0',0, '8','6','1',0, '8','6','2',0, '8','6','3',0, '8','6','4',0,
1423 '8','6','5',0, '8','6','6',0, '8','6','7',0, '8','6','8',0, '8','6','9',0,
1424 '8','7','0',0, '8','7','1',0, '8','7','2',0, '8','7','3',0, '8','7','4',0,
1425 '8','7','5',0, '8','7','6',0, '8','7','7',0, '8','7','8',0, '8','7','9',0,
1426 '8','8','0',0, '8','8','1',0, '8','8','2',0, '8','8','3',0, '8','8','4',0,
1427 '8','8','5',0, '8','8','6',0, '8','8','7',0, '8','8','8',0, '8','8','9',0,
1428 '8','9','0',0, '8','9','1',0, '8','9','2',0, '8','9','3',0, '8','9','4',0,
1429 '8','9','5',0, '8','9','6',0, '8','9','7',0, '8','9','8',0, '8','9','9',0,
1430 '9','0','0',0, '9','0','1',0, '9','0','2',0, '9','0','3',0, '9','0','4',0,
1431 '9','0','5',0, '9','0','6',0, '9','0','7',0, '9','0','8',0, '9','0','9',0,
1432 '9','1','0',0, '9','1','1',0, '9','1','2',0, '9','1','3',0, '9','1','4',0,
1433 '9','1','5',0, '9','1','6',0, '9','1','7',0, '9','1','8',0, '9','1','9',0,
1434 '9','2','0',0, '9','2','1',0, '9','2','2',0, '9','2','3',0, '9','2','4',0,
1435 '9','2','5',0, '9','2','6',0, '9','2','7',0, '9','2','8',0, '9','2','9',0,
1436 '9','3','0',0, '9','3','1',0, '9','3','2',0, '9','3','3',0, '9','3','4',0,
1437 '9','3','5',0, '9','3','6',0, '9','3','7',0, '9','3','8',0, '9','3','9',0,
1438 '9','4','0',0, '9','4','1',0, '9','4','2',0, '9','4','3',0, '9','4','4',0,
1439 '9','4','5',0, '9','4','6',0, '9','4','7',0, '9','4','8',0, '9','4','9',0,
1440 '9','5','0',0, '9','5','1',0, '9','5','2',0, '9','5','3',0, '9','5','4',0,
1441 '9','5','5',0, '9','5','6',0, '9','5','7',0, '9','5','8',0, '9','5','9',0,
1442 '9','6','0',0, '9','6','1',0, '9','6','2',0, '9','6','3',0, '9','6','4',0,
1443 '9','6','5',0, '9','6','6',0, '9','6','7',0, '9','6','8',0, '9','6','9',0,
1444 '9','7','0',0, '9','7','1',0, '9','7','2',0, '9','7','3',0, '9','7','4',0,
1445 '9','7','5',0, '9','7','6',0, '9','7','7',0, '9','7','8',0, '9','7','9',0,
1446 '9','8','0',0, '9','8','1',0, '9','8','2',0, '9','8','3',0, '9','8','4',0,
1447 '9','8','5',0, '9','8','6',0, '9','8','7',0, '9','8','8',0, '9','8','9',0,
1448 '9','9','0',0, '9','9','1',0, '9','9','2',0, '9','9','3',0, '9','9','4',0,
1449 '9','9','5',0, '9','9','6',0, '9','9','7',0, '9','9','8',0, '9','9','9',0 };
1454 #define prepbuf(buffer, num, tail) \
1456 char *s = buffer + 4; \
1457 const char *ap = atoi_tab + (num << 2); \
1459 strcpy(buffer, ":%s 000 %s "); \
1463 strcpy(s + 5, tail); \
1466 char* err_str(int n)
1471 assert(n < ERR_LASTERROR);
1472 assert(0 != replyTable[n].value);
1475 prepbuf(numbuff, p->value, p->format);
1480 char* rpl_str(int n)
1485 assert(n < ERR_LASTERROR);
1486 assert(0 != replyTable[n].value);
1489 prepbuf(numbuff, p->value, p->format);