Correct spelling of some client messages, comments and function names
This commit is contained in:
parent
b102b9d5c9
commit
bac141898b
|
@ -1,5 +1,7 @@
|
|||
[Changes 1.2.2]
|
||||
|
||||
* Correct spelling of some client messages. (gdinit)
|
||||
|
||||
* Support fractional-second intervals on recurring timers. (caf)
|
||||
|
||||
* Change $geom() to return current screen's geometry, not the original
|
||||
|
|
|
@ -474,7 +474,7 @@ BUILT_IN_COMMAND(stubcmd)
|
|||
|
||||
/*
|
||||
* Now we iterate over the item names we were given. For each
|
||||
* item name, seperated from the next by a comma, stub that item
|
||||
* item name, separated from the next by a comma, stub that item
|
||||
* to the given filename(s) specified as the arguments.
|
||||
*/
|
||||
while (name && *name)
|
||||
|
@ -651,7 +651,7 @@ BUILT_IN_COMMAND(dumpcmd)
|
|||
* QUAL := NUM "words"
|
||||
*
|
||||
* In English:
|
||||
* An argument list is a comma seperated list of variable descriptors (TERM)
|
||||
* An argument list is a comma separated list of variable descriptors (TERM)
|
||||
* enclosed in a parenthesis set. Each variable descriptor may contain any
|
||||
* valid alias name followed by an action qualifier, or may be the "..."
|
||||
* literal string, or may be the "void" literal string. If a variable
|
||||
|
@ -981,8 +981,8 @@ void add_local_alias (char *name, char *stuff)
|
|||
}
|
||||
/*
|
||||
* Now we see if this local variable exists anywhere
|
||||
* within our view. If it is, we dont care where.
|
||||
* If it doesnt, then we add it to the current frame,
|
||||
* within our view. If it is, we don't care where.
|
||||
* If it doesn't, then we add it to the current frame,
|
||||
* where it will be reaped later.
|
||||
*/
|
||||
if (!(tmp = find_local_alias (name, &list)))
|
||||
|
@ -1270,7 +1270,7 @@ static void unstub_alias (Alias *item)
|
|||
* we are un-stubbing this alias
|
||||
* because we are loading a file
|
||||
* that presumably it must be in.
|
||||
* So we dont load it again (duh).
|
||||
* So we don't load it again (duh).
|
||||
*/
|
||||
if (already_looking)
|
||||
return;
|
||||
|
@ -1311,7 +1311,7 @@ static Alias * find_local_alias (char *name, AliasSet **list)
|
|||
* Search our current local variable stack, and wind our way
|
||||
* backwards until we find a NAMED stack -- that is the enclosing
|
||||
* alias or ON call. If we find a variable in one of those enclosing
|
||||
* stacks, then we use it. If we dont, we progress.
|
||||
* stacks, then we use it. If we don't, we progress.
|
||||
*
|
||||
* This needs to be optimized for the degenerate case, when there
|
||||
* is no local variable available... It will be true 99.999% of
|
||||
|
@ -1657,7 +1657,7 @@ static char *get_variable_with_args (const char *str, const char *args, int *ar
|
|||
copy = 1, ret = getenv(str);
|
||||
|
||||
if (x_debug & DEBUG_UNKNOWN && ret == NULL)
|
||||
debugyell("Variable lookup to non-existant assign [%s]", name);
|
||||
debugyell("Variable lookup to non-existent assign [%s]", name);
|
||||
if ((internal_debug & DEBUG_VARIABLE) && alias_debug && !in_debug_yell)
|
||||
debugyell("%3d \t@%s == %s", debug_count++, str, ret ? ret : empty_string);
|
||||
new_free(&freep);
|
||||
|
@ -1940,7 +1940,7 @@ char * parse_line_with_return (char *name, char *what, char *args, int d1, int d
|
|||
/*
|
||||
* call_user_function: Executes a user alias (by way of parse_command.
|
||||
* The actual function ends up being routed through execute_alias (below)
|
||||
* and we just keep track of the retval and stuff. I dont know that anyone
|
||||
* and we just keep track of the retval and stuff. I don't know that anyone
|
||||
* depends on command completion with functions, so we can save a lot of
|
||||
* CPU time by just calling execute_alias() directly.
|
||||
*/
|
||||
|
@ -1955,7 +1955,7 @@ char *call_user_function (char *alias_name, char *args)
|
|||
if (cnt < 0)
|
||||
result = parse_line_alias_special(alias_name, sub_buffer, args, 0, 1, arglist, 1);
|
||||
else if (x_debug & DEBUG_UNKNOWN)
|
||||
debugyell("Function call to non-existant alias [%s]", alias_name);
|
||||
debugyell("Function call to non-existent alias [%s]", alias_name);
|
||||
|
||||
if (!result)
|
||||
result = m_strdup(empty_string);
|
||||
|
@ -2186,11 +2186,11 @@ void panic_dump_call_stack (void)
|
|||
|
||||
|
||||
/*
|
||||
* You may NOT call this unless youre about to exit.
|
||||
* If you do (call this when youre not about to exit), and you do it
|
||||
* very often, max_wind will get absurdly large. So dont do it.
|
||||
* You may NOT call this unless you're about to exit.
|
||||
* If you do (call this when you're not about to exit), and you do it
|
||||
* very often, max_wind will get absurdly large. So don't do it.
|
||||
*
|
||||
* XXXX - this doesnt clean up everything -- but do i care?
|
||||
* XXXX - this doesn't clean up everything -- but do I care?
|
||||
*/
|
||||
void destroy_call_stack (void)
|
||||
{
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
* that your compiler will allocate disparate structures congruently as
|
||||
* long as the members match as to their type and location. This is
|
||||
* critically important for how this code works, and all hell will break
|
||||
* loose if your compiler doesnt do this. Every compiler i know of does
|
||||
* it, which is why im assuming it, even though im not allowed to assume it.
|
||||
* loose if your compiler doesn't do this. Every compiler I know of does
|
||||
* it, which is why I'm assuming it, even though I'm not allowed to assume it.
|
||||
*
|
||||
* This file is hideous. Ill kill each and every one of you who made
|
||||
* me do this. ;-)
|
||||
|
@ -88,7 +88,7 @@ Array_item *BX_remove_from_array (Array *array, char *name)
|
|||
|
||||
return array_pop(array, location);
|
||||
}
|
||||
return NULL; /* Cant delete whats not there */
|
||||
return NULL; /* Can't delete what's not there */
|
||||
}
|
||||
|
||||
/* Remove the 'which'th item from the given array */
|
||||
|
@ -123,7 +123,7 @@ Array_item *BX_remove_all_from_array (Array *array, char *name)
|
|||
array->max--;
|
||||
return ret;
|
||||
}
|
||||
return NULL; /* Cant delete whats not there */
|
||||
return NULL; /* Can't delete what's not there */
|
||||
}
|
||||
|
||||
Array_item *BX_array_lookup (Array *array, char *name, int wild, int delete)
|
||||
|
@ -313,7 +313,7 @@ Array_item *BX_find_array_item (Array *set, char *name, int *cnt, int *loc)
|
|||
|
||||
/*
|
||||
* Repeat the same ordeal, except this time we walk upwards
|
||||
* from 'pos' until we dont find a match.
|
||||
* from 'pos' until we don't find a match.
|
||||
*/
|
||||
max = pos + 1;
|
||||
while (max < set->max && !set->func(name, ARRAY_ITEM(set, max)->name, len))
|
||||
|
@ -399,7 +399,7 @@ void * BX_find_fixed_array_item (void *list, size_t size, int howmany, const cha
|
|||
|
||||
/*
|
||||
* Repeat the same ordeal, except this time we walk upwards
|
||||
* from 'pos' until we dont find a match.
|
||||
* from 'pos' until we don't find a match.
|
||||
*/
|
||||
max = pos + 1;
|
||||
while ((max < howmany) && !strncmp(name, FIXED_ITEM(list, max, size).name, len))
|
||||
|
|
|
@ -692,7 +692,7 @@ BUILT_IN_FUNCTION(function_setitem)
|
|||
}
|
||||
|
||||
/*
|
||||
* function_getarrays() returns a string containg the names of all currently
|
||||
* function_getarrays() returns a string containing the names of all currently
|
||||
* existing arrays separated by spaces
|
||||
*/
|
||||
BUILT_IN_FUNCTION(function_getarrays)
|
||||
|
|
|
@ -1454,7 +1454,7 @@ int BX_add_to_queue(char *nick, char *command, pack *sendpack)
|
|||
|
||||
if (!sendpack || !sendpack->file)
|
||||
{
|
||||
put_it("%s: ERROR occured in cdcc add to queue", cparse(get_string_var(CDCC_PROMPT_VAR)));
|
||||
put_it("%s: ERROR occurred in cdcc add to queue", cparse(get_string_var(CDCC_PROMPT_VAR)));
|
||||
return 0;
|
||||
}
|
||||
if (queuelist)
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
/* Version 0.2 22/07/97 written by IceBreak (ice_break@hotmail.com) */
|
||||
/* 0.2: Finnally I rewrote the playing method inside the cdrom player to work
|
||||
* with msf instead of lba, and frames instead of tracks, this should fix
|
||||
* all the compability problems that the cdroms player had with some
|
||||
* cdroms. I also fixed some bugs and better problem messages.
|
||||
* all the compatibility problems that the cdrom player had with some
|
||||
* cdroms. I also fixed some bugs and improved problem messages.
|
||||
* FreeBSD support added by Eric A. Griff aka setjmp!eagriff@*.global2000.net
|
||||
*
|
||||
*/
|
||||
|
@ -101,7 +101,7 @@ int i, pos;
|
|||
if (((drive = open(dev, 0)) < 0))
|
||||
{
|
||||
if (errno == EACCES)
|
||||
put_it("%s: you dont have access to the cdrom driver",cparse(cdrom_prompt));
|
||||
put_it("%s: you don't have access to the cdrom driver",cparse(cdrom_prompt));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,7 @@ void set_cd_device(Window *win, char *str, int blah)
|
|||
|
||||
if (cd_init(str) < 0)
|
||||
{
|
||||
put_it("%s: ERROR: Could not initalize the CDROM, check if a disk is inside",cparse(cdrom_prompt));
|
||||
put_it("%s: ERROR: Could not initialize the CDROM, check if a disk is inside",cparse(cdrom_prompt));
|
||||
set_string_var(CD_DEVICE_VAR,NULL);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
* When Chelp is called the help file is loaded from
|
||||
* BitchX.help and saved. This file is never loaded from disk after this.
|
||||
* Information from the help file is loaded into an array as 0-Topic.
|
||||
* $help() also calls the same routines except this information is loaded
|
||||
* differantly as 1-Topic. this allows us to distingush between them
|
||||
* $help() also calls the same routines except this information is loaded
|
||||
* differently as 1-Topic. This allows us to distinguish between them
|
||||
* internally.
|
||||
*/
|
||||
|
||||
|
|
|
@ -157,16 +157,8 @@ char wait_nick[] = "***W***";
|
|||
IrcCommandDll *dll_commands = NULL;
|
||||
#endif
|
||||
|
||||
|
||||
AJoinList *ajoin_list = NULL;
|
||||
|
||||
/*
|
||||
* irc_command: all the availble irc commands: Note that the first entry has
|
||||
* a zero length string name and a null server command... this little trick
|
||||
* makes "/ blah blah blah" to always be sent to a channel, bypassing queries,
|
||||
* etc. Neato. This list MUST be sorted.
|
||||
*/
|
||||
|
||||
BUILT_IN_COMMAND(obits);
|
||||
BUILT_IN_COMMAND(debug_user);
|
||||
BUILT_IN_COMMAND(debugmsg);
|
||||
|
@ -208,6 +200,12 @@ BUILT_IN_COMMAND(pmcodepage);
|
|||
BUILT_IN_COMMAND(detachcmd);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* irc_command: all the available IRC commands. Note that the first entry has
|
||||
* a zero length string name and a null server command... this little trick
|
||||
* makes "/ blah blah blah" to always be sent to a channel, bypassing queries,
|
||||
* etc. Neato. This list MUST be sorted.
|
||||
*/
|
||||
|
||||
char relay_help[] = "%R[%n-list|-kick|-wall|-wallop|-msg|-notice|-topic|-kboot|-ansi|-kill|-help%R]%n %Y<%n#|channel|nick%Y> <%nchannel|nick%Y>";
|
||||
char scripting_command[] = "- Scripting command";
|
||||
|
@ -484,7 +482,7 @@ IrcCommand irc_command[] =
|
|||
{ "NOTE", "NOTE", send_comm, SERVERREQ, NULL },
|
||||
{ "NOTICE", "NOTICE", e_privmsg, 0, "%Y<%Cnick%G|%Bchannel%Y> %Y<%ntext%Y>%n\n- Sends a notice to %Y<%Cnick%G|%Bchannel%Y> with %Y<%ntext%Y>%n" },
|
||||
{ "NOTIFY", NULL, notify, 0, "%Y<%Cnick|+|-nick%Y>%n\n- Adds/displays/removes %Y<%Cnick%Y>%n to notify list" },
|
||||
{ "NSLOOKUP", "NSLookup", nslookup, 0, "%Y<%nhostname%Y>%n\n- Returns the IP adress and IP number for %Y<%nhostname%Y>%n" },
|
||||
{ "NSLOOKUP", "NSLookup", nslookup, 0, "%Y<%nhostname%Y>%n\n- Looks up the IP addresses for %Y<%nhostname%Y>%n" },
|
||||
{ "NWHOIS", NULL, nwhois, 0, "%Y<%Cnick|channel%Y>%n\n- Shows internal statistics for %Y<%Cnick%Y>%n" },
|
||||
{ "NWHOWAS", NULL, whowas, 0, "- Displays internal whowas info for all channels. This information expires after 20 minutes for users on internal list, 10 minutes for others" },
|
||||
{ "OBITS", NULL, obits, 0, "- Displays obituaries for some BitchX friends who have left us" },
|
||||
|
@ -517,7 +515,7 @@ IrcCommand irc_command[] =
|
|||
#endif
|
||||
{ "PRETEND", NULL, pretend_cmd, 0, scripting_command },
|
||||
#ifdef GUI
|
||||
{ "PROPERTIES", NULL, pmprop, 0, "GUI - Properies Dialog" },
|
||||
{ "PROPERTIES", NULL, pmprop, 0, "GUI - Properties Dialog" },
|
||||
#endif
|
||||
{ "PS", "ps", exec_cmd, 0, "- Displays process table" },
|
||||
{ "PURGE", NULL, purge, 0, "<variable>\n- Removes all traces of variable(s) specified"},
|
||||
|
@ -1137,7 +1135,7 @@ BUILT_IN_COMMAND(my_clear)
|
|||
|
||||
while ((arg = next_arg(args, &args)) != NULL)
|
||||
{
|
||||
/* -ALL and ALL here becuase the help files used to be wrong */
|
||||
/* -ALL and ALL here because the help files used to be wrong */
|
||||
if (!my_strnicmp(arg, "A", 1) || !my_strnicmp(arg+1, "A", 1))
|
||||
all = 1;
|
||||
/* UNHOLD */
|
||||
|
@ -1924,8 +1922,8 @@ BUILT_IN_COMMAND(funny_stuff)
|
|||
}
|
||||
|
||||
/*
|
||||
This isnt a command, its used by the wait command. Since its extern,
|
||||
and it doesnt use anything static in this file, im sure it doesnt
|
||||
This isn't a command, it's used by the wait command. Since it's extern,
|
||||
and it doesn't use anything static in this file, I'm sure it doesn't
|
||||
belong here.
|
||||
*/
|
||||
void oh_my_wait (int servnum)
|
||||
|
@ -2631,7 +2629,7 @@ BUILT_IN_COMMAND(e_channel)
|
|||
right here we want to check to see if the
|
||||
channel is bound to this window. if it is,
|
||||
we set it as the default channel. If it
|
||||
is not, we warn the user that we cant do it
|
||||
is not, we warn the user that we can't do it
|
||||
*/
|
||||
if (is_bound_anywhere(buffer) &&
|
||||
!(is_bound_to_window(current_window, buffer)))
|
||||
|
@ -3746,7 +3744,7 @@ static int recursion = 0;
|
|||
allow = do_hook(REDIRECT_LIST, "%s %s", nick_list, text);
|
||||
|
||||
/*
|
||||
* Dont hook /ON REDIRECT if we're being called recursively
|
||||
* Don't hook /ON REDIRECT if we're being called recursively
|
||||
*/
|
||||
if (allow)
|
||||
send_text(nick_list, text, flags);
|
||||
|
@ -3867,7 +3865,7 @@ int current_target = 0;
|
|||
* Bucket 3 -- Unencrypted NOTICEs to channels
|
||||
*
|
||||
* All other messages (encrypted, and DCC CHATs) are dispatched
|
||||
* immediately, and seperately from all others. All messages that
|
||||
* immediately, and separately from all others. All messages that
|
||||
* end up in one of the above mentioned buckets get sent out all
|
||||
* at once.
|
||||
*/
|
||||
|
@ -4347,7 +4345,7 @@ static int oper_issued = 0;
|
|||
* Other than these two conventions the line is left basically untouched.
|
||||
*/
|
||||
/* Ideas on parsing: Why should the calling function be responsible
|
||||
* for removing {} blocks? Why cant this parser cope with and {}s
|
||||
* for removing {} blocks? Why can't this parser cope with and {}s
|
||||
* that come up?
|
||||
*/
|
||||
void BX_parse_line (const char *name, char *org_line, const char *args, int hist_flag, int append_flag, int handle_local)
|
||||
|
@ -4773,9 +4771,9 @@ int current_line (void)
|
|||
/*
|
||||
* load: the /LOAD command. Reads the named file, parsing each line as
|
||||
* though it were typed in (passes each line to parse_command).
|
||||
Right now, this is broken, as it doesnt handle the passing of
|
||||
Right now, this is broken, as it doesn't handle the passing of
|
||||
the '-' flag, which is meant to force expansion of expandos
|
||||
with the arguments after the '-' flag. I think its a lame
|
||||
with the arguments after the '-' flag. I think it's a lame
|
||||
feature, anyhow. *sigh*.
|
||||
*/
|
||||
|
||||
|
@ -4856,7 +4854,7 @@ BUILT_IN_COMMAND(BX_load)
|
|||
{
|
||||
int owc = window_display;
|
||||
/* uzfopen emits an error if the file
|
||||
* is not found, so we dont have to. */
|
||||
* is not found, so we don't have to. */
|
||||
window_display = 1;
|
||||
#ifdef WANT_DLL
|
||||
if (expanded)
|
||||
|
@ -4883,7 +4881,7 @@ BUILT_IN_COMMAND(BX_load)
|
|||
continue;
|
||||
}
|
||||
/* Reformatted by jfn */
|
||||
/* *_NOT_* attached, so dont "fix" it */
|
||||
/* *_NOT_* attached, so don't "fix" it */
|
||||
{
|
||||
int in_comment = 0;
|
||||
int comment_line = -1;
|
||||
|
@ -4912,9 +4910,9 @@ BUILT_IN_COMMAND(BX_load)
|
|||
* this line from stargazer to allow \'s in scripts for continued
|
||||
* lines <spz@specklec.mpifr-bonn.mpg.de>
|
||||
* If we have \\ at the end of the line, that
|
||||
* should indicate that we DONT want the slash to
|
||||
* should indicate that we DON'T want the slash to
|
||||
* escape the newline (hop)
|
||||
* We cant just do start[len-2] because we cant say
|
||||
* We can't just do start[len-2] because we can't say
|
||||
* what will happen if len = 1... (a blank line)
|
||||
* SO....
|
||||
* If the line ends in a newline, and
|
||||
|
@ -4922,7 +4920,7 @@ BUILT_IN_COMMAND(BX_load)
|
|||
* and the 2nd to the last one is a \ and,
|
||||
* If there are EITHER 2 characters on the line or
|
||||
* the 3rd to the last character is NOT a \ and,
|
||||
* If the line isnt too big yet and,
|
||||
* If the line isn't too big yet and,
|
||||
* If we can read more from the file,
|
||||
* THEN -- adjust the length of the string
|
||||
*/
|
||||
|
@ -4983,11 +4981,11 @@ BUILT_IN_COMMAND(BX_load)
|
|||
/* switch statement tabbed back */
|
||||
case '/' :
|
||||
{
|
||||
/* If we're in a comment, any slashes that arent preceeded by
|
||||
a star is just ignored (cause its in a comment, after all >;) */
|
||||
/* If we're in a comment, any slashes that aren't preceded by
|
||||
a star are just ignored. */
|
||||
if (in_comment)
|
||||
{
|
||||
/* ooops! cant do ptr[-1] if ptr == optr... doh! */
|
||||
/* ooops! can't do ptr[-1] if ptr == optr... doh! */
|
||||
if ((ptr > start) && (ptr[-1] == '*'))
|
||||
{
|
||||
in_comment = 0;
|
||||
|
@ -5331,7 +5329,7 @@ BUILT_IN_COMMAND(evalcmd)
|
|||
}
|
||||
|
||||
/*
|
||||
* inputcmd: the INPUT command. Takes a couple of arguements...
|
||||
* inputcmd: the INPUT command. Takes a couple of arguments...
|
||||
* the first surrounded in double quotes, and the rest makes up
|
||||
* a normal ircII command. The command is evalutated, with $*
|
||||
* being the line that you input. Used add_wait_prompt() to prompt
|
||||
|
@ -5469,7 +5467,7 @@ BUILT_IN_COMMAND(pretend_cmd)
|
|||
* io event, so that might also start adding up. Oh well, TIOLI.
|
||||
*
|
||||
* Without an argument, it waits for the user to press a key. Any key.
|
||||
* and the key is accepted. Thats probably not right, ill work on that.
|
||||
* and the key is accepted. That's probably not right, I'll work on that.
|
||||
*/
|
||||
static int e_pause_cb_throw = 0;
|
||||
static void e_pause_cb (char *u1, char *u2) { e_pause_cb_throw--; }
|
||||
|
@ -5499,7 +5497,7 @@ struct timeval start;
|
|||
start.tv_usec %= 1000000;
|
||||
|
||||
/*
|
||||
* I use comment here simply becuase its not going to mess
|
||||
* I use comment here simply because it's not going to mess
|
||||
* with the arguments.
|
||||
*/
|
||||
add_timer(0, empty_string, milliseconds, 1, (int (*)(void *, char *))comment, NULL, NULL, get_current_winref(), "pause");
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
* Everything that im not directly responsible for i put in here. Almost
|
||||
* Everything that I'm not directly responsible for I put in here. Almost
|
||||
* all of this stuff is either borrowed from somewhere else (for those poor
|
||||
* saps that dont have something you need), or i wrote (and put into the
|
||||
* saps that don't have something you need), or I wrote (and put into the
|
||||
* public domain) in order to make epic compile on some of the more painful
|
||||
* systems. None of this is part of EPIC-proper, so dont feel that youre
|
||||
* systems. None of this is part of EPIC-proper, so don't feel that you're
|
||||
* going to hurt my feelings if you re-use this.
|
||||
*/
|
||||
|
||||
|
@ -183,7 +183,7 @@ static int termcap;
|
|||
%c output pop as a char
|
||||
%'c' push character constant c.
|
||||
%{n} push decimal constant n.
|
||||
%p[1-9] push paramter [1-9]
|
||||
%p[1-9] push parameter [1-9]
|
||||
%g[a-z] push variable [a-z]
|
||||
%P[a-z] put pop in variable [a-z]
|
||||
%l push the length of pop (a string)
|
||||
|
@ -221,7 +221,7 @@ static int termcap;
|
|||
(UW) %sx subtract parameter FROM the character x
|
||||
%>xy if parameter > character x then add character y to parameter
|
||||
%B convert to BCD (parameter = (parameter/10)*16 + parameter%16)
|
||||
%D Delta Data encode (parameter = parameter - 2*(paramter%16))
|
||||
%D Delta Data encode (parameter = parameter - 2*(parameter%16))
|
||||
%i increment the first two parameters by one
|
||||
%n xor the first two parameters by 0140
|
||||
(GNU) %m xor the first two parameters by 0177
|
||||
|
@ -229,7 +229,7 @@ static int termcap;
|
|||
(GNU) %b backup to previous parameter
|
||||
(GNU) %f skip this parameter
|
||||
|
||||
Note the two definitions of %a, the GNU defintion is used if the characters
|
||||
Note the two definitions of %a, the GNU definition is used if the characters
|
||||
after the 'a' are valid, otherwise the UW definition is used.
|
||||
|
||||
(GNU) used by GNU Emacs termcap libraries
|
||||
|
@ -329,8 +329,8 @@ char *tparm(const char *str, ...) {
|
|||
return OOPS;
|
||||
if ((sp[1] == 'p' || sp[1] == 'c')
|
||||
&& sp[2] != '\0' && fmt == NULL) {
|
||||
/* GNU aritmitic parameter, what they
|
||||
realy need is terminfo. */
|
||||
/* GNU arithmetic parameter, what they
|
||||
really need is terminfo. */
|
||||
int val, lc;
|
||||
if (sp[1] == 'p'
|
||||
&& getarg(termcap - 1 + sp[2] - '@',
|
||||
|
@ -339,7 +339,7 @@ char *tparm(const char *str, ...) {
|
|||
if (sp[1] == 'c') {
|
||||
lc = cvtchar(sp + 2, &c) + 2;
|
||||
/* Mask out 8th bit so \200 can be
|
||||
used for \0 as per GNU doc's */
|
||||
used for \0 as per GNU docs */
|
||||
val = c & 0177;
|
||||
} else
|
||||
lc = 2;
|
||||
|
@ -879,7 +879,7 @@ unsigned long strtoul (const char *nptr, char **endptr, int base)
|
|||
/*
|
||||
* Copyright (c) 1987, 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
* See above for the neccesary list of conditions on use.
|
||||
* See above for the necessary list of conditions on use.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -1026,7 +1026,7 @@ void bsd_unsetenv(const char *name)
|
|||
* Copyright (c) 1983, 1990, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
|
||||
* See above for the neccesary list of conditions on use.
|
||||
* See above for the necessary list of conditions on use.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -1138,7 +1138,7 @@ CTCP_HANDLER(do_ping_reply)
|
|||
time_t tsec = 0, tusec = 0, orig;
|
||||
|
||||
if (!cmd || !*cmd)
|
||||
return NULL; /* This is a fake -- cant happen. */
|
||||
return NULL; /* This is a fake -- can't happen. */
|
||||
|
||||
orig = my_atol(cmd);
|
||||
|
||||
|
@ -1219,9 +1219,9 @@ extern char *do_ctcp (char *from, char *to, char *str)
|
|||
/*
|
||||
* Yes, this intentionally ignores "unlimited" CTCPs like
|
||||
* UTC and SED. Ultimately, we have to make sure that
|
||||
* CTCP expansions dont overrun any buffers that might
|
||||
* CTCP expansions don't overrun any buffers that might
|
||||
* contain this string down the road. So by allowing up to
|
||||
* 4 CTCPs, we know we cant overflow -- but if we have more
|
||||
* 4 CTCPs, we know we can't overflow -- but if we have more
|
||||
* than 40, it might overflow, and its probably a spam, so
|
||||
* no need to shed tears over ignoring them. Also makes
|
||||
* the sanity checking much simpler.
|
||||
|
@ -1690,8 +1690,8 @@ int get_ctcp_val (char *str)
|
|||
* calls this function is edit.c:ctcp(), and it immediately
|
||||
* calls send_ctcp(). So the pointer that is being passed
|
||||
* to us is globally allocated at a level higher then ctcp().
|
||||
* so it wont be bogus until some time after ctcp() returns,
|
||||
* but at that point, we dont care any more.
|
||||
* so it won't be bogus until some time after ctcp() returns,
|
||||
* but at that point, we don't care any more.
|
||||
*/
|
||||
ctcp_cmd[CTCP_CUSTOM].name = str;
|
||||
return CTCP_CUSTOM;
|
||||
|
@ -1717,7 +1717,7 @@ void BX_split_CTCP(char *raw_message, char *ctcp_dest, char *after_ctcp)
|
|||
if (!ctcp_end)
|
||||
{
|
||||
*--ctcp_start = CTCP_DELIM_CHAR;
|
||||
return; /* Thats _not_ a CTCP. */
|
||||
return; /* That's _not_ a CTCP. */
|
||||
}
|
||||
|
||||
*ctcp_end++ = 0;
|
||||
|
|
20
source/dcc.c
20
source/dcc.c
|
@ -1166,7 +1166,7 @@ static int check_collision(char *nick, const char *description, int type)
|
|||
dcc_chat(NULL, nick);
|
||||
return 0;
|
||||
}
|
||||
send_ctcp(CTCP_NOTICE, nick, CTCP_DCC, "DCC %s collision occured while connecting to %s (%s)", type, nickname, description);
|
||||
send_ctcp(CTCP_NOTICE, nick, CTCP_DCC, "DCC %s collision occurred while connecting to %s (%s)", type, nickname, description);
|
||||
erase_dcc_info(s->is_read, 1, "%s", convert_output_format("$G %RDCC%n $0 collision for $1:$2", "%s %s %s", type, nick, description));
|
||||
close_socketread(s->is_read);
|
||||
return 0;
|
||||
|
@ -1567,8 +1567,8 @@ void handle_dcc_offer(struct dcc_offer *offer)
|
|||
else if (!my_stricmp(offer->type, "RESUME"))
|
||||
|
||||
/*
|
||||
* Dont be deceieved by the arguments we're passing it.
|
||||
* The arguments are "out of order" because MIRC doesnt
|
||||
* Don't be deceived by the arguments we're passing it.
|
||||
* The arguments are "out of order" because MIRC doesn't
|
||||
* send them in the traditional order. Ugh. Comments
|
||||
* borrowed from epic.
|
||||
*/
|
||||
|
@ -1749,7 +1749,7 @@ void close_dcc_file(int snum)
|
|||
xtime = 1.0;
|
||||
temp = xfer / xtime;
|
||||
sprintf(lame_ultrix, "%2.4g %s", _GMKv(temp), _GMKs(temp));
|
||||
/* Cant pass %g to put_it (lame ultrix/dgux), fix suggested by sheik. */
|
||||
/* Can't pass %g to put_it (lame ultrix/dgux), fix suggested by sheik. */
|
||||
sprintf(lame_ultrix2, "%2.4g%s", _GMKv(xfer), _GMKs(xfer));
|
||||
sprintf(lame_ultrix3, "%2.4g", xtime);
|
||||
|
||||
|
@ -3130,7 +3130,7 @@ int dcc_exempt_save(FILE *fptr)
|
|||
|
||||
/*
|
||||
* This is a callback. When we want to do a CTCP DCC REJECT, we do
|
||||
* a WHOIS to make sure theyre still on irc, no sense sending it to
|
||||
* a WHOIS to make sure they're still on irc, no sense sending it to
|
||||
* nobody in particular. When this gets called back, that means the
|
||||
* peer is indeed on irc, so we send them the REJECT.
|
||||
*/
|
||||
|
@ -3143,7 +3143,7 @@ static void output_reject_ctcp (UserhostItem *stuff, char *nick, char *args)
|
|||
if (!strcmp(stuff->user, "<UNKNOWN>"))
|
||||
return;
|
||||
/*
|
||||
* XXX This is, of course, a monsterous hack.
|
||||
* XXX This is, of course, a monstrous hack.
|
||||
*/
|
||||
next_arg(args, &args);
|
||||
type = next_arg(args, &args);
|
||||
|
@ -3640,14 +3640,14 @@ int blocksize = 0;
|
|||
if (!(fullname = expand_twiddle(tmp)))
|
||||
malloc_strcpy(&fullname, tmp);
|
||||
/*
|
||||
* This has to be done by hand, we cant use send_ctcp,
|
||||
* This has to be done by hand, we can't use send_ctcp,
|
||||
* because this violates the protocol, and send_ctcp checks
|
||||
* for that. Ugh.
|
||||
*/
|
||||
|
||||
if (stat(fullname, &sb) == -1)
|
||||
{
|
||||
/* File doesnt exist. Sheesh. */
|
||||
/* File doesn't exist. Sheesh. */
|
||||
put_it("%s", convert_output_format("$G %RDCC%n Cannot use DCC RESUME if the file doesn't exist [$0|$1-]", "%s %s", fullname, strerror(errno)));
|
||||
continue;
|
||||
}
|
||||
|
@ -3686,14 +3686,14 @@ DCC_dllcommands *dcc_comm = NULL;
|
|||
upper(comm);
|
||||
if ((dcc_comm = (DCC_dllcommands *)find_in_list((List **)&dcc_dllcommands, comm, 0)))
|
||||
{
|
||||
put_it("%s", convert_output_format("$G Usage: %W/%R$0%n $1 %K-%n $2-", "DCC %s %s", dcc_comm->name, dcc_comm->help?dcc_comm->help:"No help availble yet"));
|
||||
put_it("%s", convert_output_format("$G Usage: %W/%R$0%n $1 %K-%n $2-", "DCC %s %s", dcc_comm->name, dcc_comm->help?dcc_comm->help:"No help available yet"));
|
||||
return;
|
||||
}
|
||||
for (i = 0; dcc_commands[i].name != NULL; i++)
|
||||
{
|
||||
if (!strncmp(comm, dcc_commands[i].name, strlen(comm)))
|
||||
{
|
||||
put_it("%s", convert_output_format("$G Usage: %W/%R$0%n $1 %K-%n $2-", "DCC %s %s", dcc_commands[i].name, dcc_commands[i].help?dcc_commands[i].help:"No help availble yet"));
|
||||
put_it("%s", convert_output_format("$G Usage: %W/%R$0%n $1 %K-%n $2-", "DCC %s %s", dcc_commands[i].name, dcc_commands[i].help?dcc_commands[i].help:"No help available yet"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* debug.c -- controll the values of x_debug.
|
||||
* debug.c -- control the values of x_debug.
|
||||
*
|
||||
* Written by Jeremy Nelson
|
||||
* Copyright 1997 EPIC Software Labs
|
||||
|
|
|
@ -78,7 +78,7 @@ static void cleanup_dead_processes (void);
|
|||
static void ignore_process (int index);
|
||||
void kill_process (int, int);
|
||||
static void kill_all_processes (int signo);
|
||||
static int valid_process_index (int proccess);
|
||||
static int valid_process_index (int process);
|
||||
static int is_logical_unique (char *logical);
|
||||
int logical_to_index (const char *logical);
|
||||
extern int dead_children_processes;
|
||||
|
@ -213,7 +213,7 @@ BUILT_IN_COMMAND(execcmd)
|
|||
|
||||
/*
|
||||
* /EXEC -NAME gives the /exec a logical name that can be
|
||||
* refered to as %name
|
||||
* referred to as %name
|
||||
*/
|
||||
else if (my_strnicmp(flag, "NAME", len) == 0)
|
||||
{
|
||||
|
@ -680,7 +680,7 @@ BUILT_IN_COMMAND(execcmd)
|
|||
new_close(p2[1]);
|
||||
|
||||
/*
|
||||
* Init the proc list if neccesary
|
||||
* Init the proc list if necessary
|
||||
*/
|
||||
if (!process_list)
|
||||
{
|
||||
|
@ -898,7 +898,7 @@ static void handle_filedesc (Process *proc, int *fd, int hook_nonl, int hook_nl
|
|||
* we reach a specific wanted sub-process.
|
||||
*
|
||||
* If you want to stop reaping children when a specific subprocess is
|
||||
* reached, specify the process in 'wanted'. If all youre doing is cleaning
|
||||
* reached, specify the process in 'wanted'. If all you're doing is cleaning
|
||||
* up after zombies and /exec's, then 'wanted' should be -1.
|
||||
*/
|
||||
|
||||
|
@ -984,7 +984,7 @@ int get_child_exit (pid_t wanted)
|
|||
|
||||
/*
|
||||
* clean_up_processes: In effect, we want to tell all of our sub processes
|
||||
* that we're going away. We cant be 100% sure that theyre all dead by
|
||||
* that we're going away. We can't be 100% sure that they're all dead by
|
||||
* the time this function returns, but we can be 100% sure that they will
|
||||
* be killed off next time they come up to run. This is the only thing that
|
||||
* can be guaranteed, and is in fact all we really need to know.
|
||||
|
@ -1080,10 +1080,10 @@ void add_process_wait (int proc_index, const char *cmd)
|
|||
* have closed stdin and stderr already (handled by do_processes)
|
||||
* 2) The process must have died (handled by get_child_exit)
|
||||
*
|
||||
* The reason why both must happen is becuase the process can die (and
|
||||
* The reason why both must happen is because the process can die (and
|
||||
* we would get an async signal) before we read all of its output on the
|
||||
* pipe, and if we simply deleted the process when it dies, we could lose
|
||||
* some of its output. The reason why we cant delete a process that has
|
||||
* some of its output. The reason why we can't delete a process that has
|
||||
* asserted EOF on its output is because it could still be running (duh! ;-)
|
||||
* So we wait for both to happen.
|
||||
*/
|
||||
|
@ -1371,7 +1371,7 @@ static int is_logical_unique (char *logical)
|
|||
|
||||
|
||||
/*
|
||||
* logical_to_index: converts a logical process name to it's approriate index
|
||||
* logical_to_index: converts a logical process name to its approriate index
|
||||
* in the process list, or -1 if not found
|
||||
*/
|
||||
int logical_to_index (const char *logical)
|
||||
|
|
|
@ -23,7 +23,7 @@ char *alias_string = NULL;
|
|||
|
||||
/************************** EXPRESSION MODE PARSER ***********************/
|
||||
/* canon_number: canonicalizes number to something relevant */
|
||||
/* If FLOATING_POINT_MATH isnt set, it truncates it to an integer */
|
||||
/* If FLOATING_POINT_MATH isn't set, it truncates it to an integer */
|
||||
static char *canon_number (char *input)
|
||||
{
|
||||
int end = strlen(input);
|
||||
|
@ -60,7 +60,7 @@ static char *canon_number (char *input)
|
|||
/* Given a pointer to an operator, find the last operator in the string */
|
||||
static char *lastop (char *ptr)
|
||||
{
|
||||
/* dont ask why i put the space in there. */
|
||||
/* don't ask why I put the space in there. */
|
||||
while (ptr[1] && strchr("!=<>&^|#+/%,-* ", ptr[1]))
|
||||
ptr++;
|
||||
return ptr;
|
||||
|
@ -220,7 +220,7 @@ union
|
|||
|
||||
|
||||
/*
|
||||
* This sets up a type-independant section of code for doing an
|
||||
* This sets up a type-independent section of code for doing an
|
||||
* operation when the X and X= forms are both valid.
|
||||
*/
|
||||
#define SETUP(var1, var2, func, STAGE) \
|
||||
|
@ -326,7 +326,7 @@ union
|
|||
* If we're not in NU_UNIT, then we have a paren-set
|
||||
* that (probably) is still an left-operand for some
|
||||
* binary op. Anyhow, we just immediately parse the
|
||||
* paren-set, as thats the general idea of parens.
|
||||
* paren-set, as that's the general idea of parens.
|
||||
*/
|
||||
if (stage != NU_UNIT || ptr == str)
|
||||
{
|
||||
|
@ -378,7 +378,7 @@ union
|
|||
*
|
||||
* /eval echo ${foobar() ## 4 + 3}
|
||||
*
|
||||
* Dont depend on this behavior.
|
||||
* Don't depend on this behavior.
|
||||
*/
|
||||
if (ptr && *ptr)
|
||||
{
|
||||
|
@ -395,7 +395,7 @@ union
|
|||
* Braces are used for anonymous functions:
|
||||
* @ condition : {some code} : {some more code}
|
||||
*
|
||||
* Dont yell at me if you dont think its useful. Im just
|
||||
* Don't yell at me if you don't think it's useful. I'm just
|
||||
* supporting it because it makes sense. And it saves you
|
||||
* from having to declare aliases to do the parts.
|
||||
*/
|
||||
|
@ -570,7 +570,7 @@ union
|
|||
*
|
||||
* If $foobar.onetwo is "999"
|
||||
* then ${foobar[one]two + 3} is "1002"
|
||||
* Dont depend on this behavior.
|
||||
* Don't depend on this behavior.
|
||||
*/
|
||||
if (ptr && *ptr)
|
||||
{
|
||||
|
@ -589,7 +589,7 @@ union
|
|||
*
|
||||
* If $onetwo is "testing",
|
||||
* /eval echo ${[one]two} returns "testing".
|
||||
* Dont depend on this behavior.
|
||||
* Don't depend on this behavior.
|
||||
*/
|
||||
else if (ptr && *ptr)
|
||||
{
|
||||
|
@ -1569,9 +1569,9 @@ register unsigned char c;
|
|||
* actually the same as $(bar), which is actually $bar.
|
||||
* Got it?
|
||||
*
|
||||
* epic4pre1.049 -- I changed this somewhat. I dont know if
|
||||
* itll get me in trouble. It will continue to expand the
|
||||
* inside of the parens until the first character isnt a $.
|
||||
* epic4pre1.049 -- I changed this somewhat. I don't know if
|
||||
* it'll get me in trouble. It will continue to expand the
|
||||
* inside of the parens until the first character isn't a $.
|
||||
* since by all accounts the result of the expansion is
|
||||
* SUPPOSED to be an rvalue, obviously a leading $ precludes
|
||||
* this. However, there are definitely some cases where you
|
||||
|
@ -1593,7 +1593,7 @@ register unsigned char c;
|
|||
debugyell("Unmatched ( (continuing anyways)");
|
||||
|
||||
/*
|
||||
* Keep expanding as long as neccesary.
|
||||
* Keep expanding as long as necessary.
|
||||
*/
|
||||
do
|
||||
{
|
||||
|
|
|
@ -59,21 +59,21 @@ static char *alias_special_char(char **, char *, const char *, char *, int *);
|
|||
|
||||
/*
|
||||
* One thing of note is that while the original did only ints, we really
|
||||
* only do strings. We convert to and from ints as neccesary. Icky,
|
||||
* but given the semantics we require its the only way.
|
||||
* only do strings. We convert to and from ints as necessary. Icky,
|
||||
* but given the semantics we require it's the only way.
|
||||
*/
|
||||
/*
|
||||
* All the information for each expression is stored in a struct. This
|
||||
* is done so that there are no global variables in use (theyre all collected
|
||||
* is done so that there are no global variables in use (they're all collected
|
||||
* making them easier to handle), and makes re-entrancy much easier since
|
||||
* i dont have to ask myself "have i accounted for the old state of all the
|
||||
* I don't have to ask myself "have I accounted for the old state of all the
|
||||
* global variables?"
|
||||
*/
|
||||
|
||||
/*
|
||||
* When we want to refer symbolically to a token, we just sling around
|
||||
* the integer index to the token table. This serves two purposes: We
|
||||
* dont have to worry about whether something is malloced or not, or who
|
||||
* don't have to worry about whether something is malloced or not, or who
|
||||
* is resopnsible to free, or anything like that. If you want to keep
|
||||
* something around, you tokenize() it and that returns a "handle" to the
|
||||
* token and then you pass that handle around. So the pair (context,handle)
|
||||
|
@ -84,7 +84,7 @@ typedef int TOKEN;
|
|||
/*
|
||||
* This sets up whether we do floating point math or integer math
|
||||
*/
|
||||
#ifdef FLOATING_POINT_MATH /* XXXX This doesnt work yet */
|
||||
#ifdef FLOATING_POINT_MATH /* XXXX This doesn't work yet */
|
||||
typedef double NUMBER;
|
||||
typedef long BooL;
|
||||
# define STON atof
|
||||
|
@ -256,13 +256,13 @@ enum LEX {
|
|||
/*
|
||||
* Precedence table: Operators with a lower precedence VALUE have a higher
|
||||
* precedence. The theory behind infix notation (algebraic notation) is that
|
||||
* you have a sequence of operands seperated by (typically binary) operators.
|
||||
* you have a sequence of operands separated by (typically binary) operators.
|
||||
* The problem of precedence is that each operand is surrounded by two
|
||||
* operators, so it is ambiguous which operator the operand "binds" to. This
|
||||
* is resolved by "precedence rules" which state that given two operators,
|
||||
* which one is allowed to "reduce" (operate on) the operand. For a simple
|
||||
* explanation, take the expression (3+4*5). Now the middle operand is a
|
||||
* '4', but we dont know if it should be reduced via the plus, or via the
|
||||
* '4', but we don't know if it should be reduced via the plus, or via the
|
||||
* multiply. If we look up both operators in the prec table, we see that
|
||||
* multiply has the lower value -- therefore the 4 is reduced via the multiply
|
||||
* and then the result of the multiply is reduced by the addition.
|
||||
|
@ -303,10 +303,10 @@ static int prec[TOKCOUNT] =
|
|||
|
||||
|
||||
/*
|
||||
* Associativity table: But precedence isnt enough. What happens when you
|
||||
* Associativity table: But precedence isn't enough. What happens when you
|
||||
* have two identical operations to determine between? Well, the easy way
|
||||
* is to say that the first operation is always done first. But some
|
||||
* operators dont work that way (like the assignment operator) and always
|
||||
* operators don't work that way (like the assignment operator) and always
|
||||
* reduce the LAST (or rightmost) operation first. For example:
|
||||
* (3+4+5) ((4+3)+5) (7+5) (12)
|
||||
* (v1=v2=3) (v1=(v2=3)) (v1=3) (3)
|
||||
|
@ -472,7 +472,7 @@ static char * getsval2 (expr_info *c, TOKEN s)
|
|||
return extract2(c->args, j, EOS);
|
||||
}
|
||||
|
||||
/* Anything else we dont grok */
|
||||
/* Anything else we don't grok */
|
||||
else
|
||||
return expand_alias(t, c->args,
|
||||
c->args_flag, NULL);
|
||||
|
@ -564,7 +564,7 @@ __inline static BooL getbval (expr_info *c, TOKEN s)
|
|||
* When you have an lvalue (left hand side of an assignment) that needs to
|
||||
* be assigned to, then you can call these functions to assign to it the
|
||||
* appropriate type. The basic operation is to assign and rvalue token
|
||||
* to an lvalue token. But some times you dont always have a tokenized
|
||||
* to an lvalue token. But some times you don't always have a tokenized
|
||||
* rvalue, so you can just pass in a raw value and we will tokenize it for
|
||||
* you and go from there. Note that the "result" of an assignment is the
|
||||
* rvalue token. This is then pushed back onto the stack.
|
||||
|
@ -665,7 +665,7 @@ __inline static TOKEN pop (expr_info *c)
|
|||
{
|
||||
/*
|
||||
* Attempting to pop more operands than are available
|
||||
* Yeilds empty values. Thats probably the most reasonable
|
||||
* yields empty values. That's probably the most reasonable
|
||||
* course of action.
|
||||
*/
|
||||
error("Cannot pop operand: no more operands");
|
||||
|
@ -808,7 +808,7 @@ __inline static void pop3 (expr_info *c, NUMBER *a, TOKEN *v, TOKEN *w)
|
|||
|
||||
/*
|
||||
* This is the reducer. It takes the relevant arguments off the argument
|
||||
* stack and then performs the neccesary operation on them.
|
||||
* stack and then performs the necessary operation on them.
|
||||
*/
|
||||
void op (expr_info *cx, int what)
|
||||
{
|
||||
|
@ -826,7 +826,7 @@ void op (expr_info *cx, int what)
|
|||
}
|
||||
|
||||
if (cx->errflag)
|
||||
return; /* Dont parse on an error */
|
||||
return; /* Don't parse on an error */
|
||||
|
||||
#define BINARY(x) \
|
||||
{ \
|
||||
|
@ -993,7 +993,7 @@ void op (expr_info *cx, int what)
|
|||
*tmp;
|
||||
|
||||
if (top(cx) == MAGIC_TOKEN)
|
||||
break; /* Dont do anything */
|
||||
break; /* Don't do anything */
|
||||
|
||||
s = pops(cx);
|
||||
tmp = expand_alias(s, cx->args, cx->args_flag, NULL);
|
||||
|
@ -1145,7 +1145,7 @@ void op (expr_info *cx, int what)
|
|||
case GEQ: COMPARE(a >= b, my_stricmp(s, t) >= 0)
|
||||
|
||||
|
||||
/* Miscelaneous operators */
|
||||
/* Miscellaneous operators */
|
||||
case QUEST:
|
||||
pop3(cx, &a, &v, &w);
|
||||
if (x_debug & DEBUG_NEW_MATH_DEBUG)
|
||||
|
@ -1263,7 +1263,7 @@ static int zzlex (expr_info *c)
|
|||
case ')':
|
||||
/*
|
||||
* If we get a close paren and the lexer is expecting
|
||||
* an operand, then obviously thats a syntax error.
|
||||
* an operand, then obviously that's a syntax error.
|
||||
* But we gently just insert the empty value as the
|
||||
* rhs for the last operand and hope it all works out.
|
||||
*/
|
||||
|
@ -1481,11 +1481,11 @@ static int zzlex (expr_info *c)
|
|||
return QUEST;
|
||||
case ':':
|
||||
/*
|
||||
* I dont want to hear anything from you anti-goto
|
||||
* I don't want to hear anything from you anti-goto
|
||||
* bigots out there. ;-) If you can't figure out
|
||||
* what this does, you ought to give up programming.
|
||||
* And a big old :p to everyone who insisted that
|
||||
* i support this horrid hack.
|
||||
* I support this horrid hack.
|
||||
*/
|
||||
if (c->operand)
|
||||
goto handle_expando;
|
||||
|
@ -1605,7 +1605,7 @@ static void mathparse (expr_info *c, int pc)
|
|||
onoeval;
|
||||
|
||||
/*
|
||||
* Drop out of parsing if an error has occured
|
||||
* Drop out of parsing if an error has occurred
|
||||
*/
|
||||
if (c->errflag)
|
||||
return;
|
||||
|
@ -1620,7 +1620,7 @@ static void mathparse (expr_info *c, int pc)
|
|||
*/
|
||||
while (prec[c->mtok] <= pc)
|
||||
{
|
||||
/* Drop out if an error has occured */
|
||||
/* Drop out if an error has occurred */
|
||||
if (c->errflag)
|
||||
return;
|
||||
|
||||
|
@ -1757,7 +1757,7 @@ static void mathparse (expr_info *c, int pc)
|
|||
* This is the new math parser. It sets up an execution context, which
|
||||
* contains sundry information like all the extracted tokens, intermediate
|
||||
* tokens, shifted tokens, and the like. The expression context is passed
|
||||
* around from function to function, each function is totaly independant
|
||||
* around from function to function, each function is totally independent
|
||||
* of state information stored in global variables. Therefore, this math
|
||||
* parser is re-entrant safe.
|
||||
*/
|
||||
|
|
|
@ -1235,9 +1235,9 @@ static char *alias_server_version (void)
|
|||
* you consistently use these macros to do the dirty work for you, you
|
||||
* will never have to do bounds checking as the macros do that for you. >;-)
|
||||
*
|
||||
* Yes, i realize it makes the code slightly less efficient, but i feel that
|
||||
* the cost is minimal compared to how much time i have spent over the last
|
||||
* year debugging these functions and the fact i wont have to again. ;-)
|
||||
* Yes, I realize it makes the code slightly less efficient, but I feel that
|
||||
* the cost is minimal compared to how much time I have spent over the last
|
||||
* year debugging these functions and the fact I won't have to again. ;-)
|
||||
*/
|
||||
|
||||
#define EMPTY empty_string
|
||||
|
@ -1465,7 +1465,7 @@ BUILT_IN_FUNCTION(function_tdiff, input)
|
|||
/*
|
||||
* If we have a decmial point, and is_number() returns 1,
|
||||
* then we know that we have a real, authentic number AFTER
|
||||
* the decmial point. As long as it isnt zero, we want it.
|
||||
* the decmial point. As long as it isn't zero, we want it.
|
||||
*/
|
||||
if (*after == '.')
|
||||
number = atol(after + 1);
|
||||
|
@ -1509,7 +1509,7 @@ BUILT_IN_FUNCTION(function_index, input)
|
|||
/*
|
||||
* Usage: $rindex(characters text)
|
||||
* Returns: The number of leading characters in <text> that occur before the
|
||||
* *last* occurance of any of the characters in the <characters>
|
||||
* *last* occurrence of any of the characters in the <characters>
|
||||
* argument.
|
||||
* Example: $rindex(f three fine frogs) returns 12 (the 'f' in 'frogs')
|
||||
* $rindex(frg three fine frogs) returns 15 (the 'g' in 'froGs')
|
||||
|
@ -1518,7 +1518,7 @@ BUILT_IN_FUNCTION(function_rindex, word)
|
|||
{
|
||||
char *chars, *last;
|
||||
|
||||
/* need to find out why ^x doesnt work */
|
||||
/* need to find out why ^x doesn't work */
|
||||
GET_STR_ARG(chars, word);
|
||||
last = rsindex(word + strlen(word) - 1, word, chars, 1);
|
||||
RETURN_INT(last ? last - word : -1);
|
||||
|
@ -1618,7 +1618,7 @@ BUILT_IN_FUNCTION(function_userhost, input)
|
|||
else
|
||||
m_s3cat(&retval, space, unknown_userhost);
|
||||
}
|
||||
return retval; /* DONT USE RETURN_STR HERE! */
|
||||
return retval; /* DON'T USE RETURN_STR HERE! */
|
||||
}
|
||||
RETURN_STR(FromUserHost);
|
||||
}
|
||||
|
@ -1655,7 +1655,7 @@ BUILT_IN_FUNCTION(function_strip, input)
|
|||
}
|
||||
*dp = '\0';
|
||||
|
||||
return result; /* DONT USE RETURN_STR HERE! */
|
||||
return result; /* DON'T USE RETURN_STR HERE! */
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1681,7 +1681,7 @@ BUILT_IN_FUNCTION(function_encode, input)
|
|||
}
|
||||
result[i] = '\0';
|
||||
|
||||
return result; /* DONT USE RETURN_STR HERE! */
|
||||
return result; /* DON'T USE RETURN_STR HERE! */
|
||||
}
|
||||
|
||||
|
||||
|
@ -1708,14 +1708,14 @@ BUILT_IN_FUNCTION(function_decode, input)
|
|||
|
||||
while (input[0] && input[1])
|
||||
{
|
||||
/* oops, this isnt quite right. */
|
||||
/* oops, this isn't quite right. */
|
||||
result[i] = ((input[0] - 'A') << 4) | (input[1] - 'A');
|
||||
input += 2;
|
||||
i++;
|
||||
}
|
||||
result[i] = '\0';
|
||||
|
||||
return (char *)result; /* DONT USE RETURN_STR HERE! */
|
||||
return (char *)result; /* DON'T USE RETURN_STR HERE! */
|
||||
}
|
||||
|
||||
|
||||
|
@ -1846,7 +1846,7 @@ BUILT_IN_FUNCTION(function_connect, input)
|
|||
GET_STR_ARG(host, input);
|
||||
GET_INT_ARG(port, input);
|
||||
|
||||
return dcc_raw_connect(host, port); /* DONT USE RETURN_STR HERE! */
|
||||
return dcc_raw_connect(host, port); /* DON'T USE RETURN_STR HERE! */
|
||||
}
|
||||
|
||||
|
||||
|
@ -1868,7 +1868,7 @@ BUILT_IN_FUNCTION(function_listen, input)
|
|||
}
|
||||
|
||||
result = dcc_raw_listen(port);
|
||||
RETURN_STR(result); /* DONT REMOVE RESULT! */
|
||||
RETURN_STR(result); /* DON'T REMOVE RESULT! */
|
||||
}
|
||||
|
||||
BUILT_IN_FUNCTION(function_toupper, input)
|
||||
|
@ -1898,7 +1898,7 @@ BUILT_IN_FUNCTION(function_channels, input)
|
|||
}
|
||||
if (window->server <= -1)
|
||||
RETURN_EMPTY;
|
||||
return create_channel_list(window); /* DONT USE RETURN_STR HERE! */
|
||||
return create_channel_list(window); /* DON'T USE RETURN_STR HERE! */
|
||||
}
|
||||
|
||||
BUILT_IN_FUNCTION(function_servers, input)
|
||||
|
@ -1988,7 +1988,7 @@ BUILT_IN_FUNCTION(function_before, word)
|
|||
char *tmp;
|
||||
long numint;
|
||||
|
||||
GET_STR_ARG(tmp, word); /* DONT DELETE TMP! */
|
||||
GET_STR_ARG(tmp, word); /* DON'T DELETE TMP! */
|
||||
numint = atol(tmp);
|
||||
|
||||
if (numint)
|
||||
|
@ -2059,7 +2059,7 @@ BUILT_IN_FUNCTION(function_leftw, word)
|
|||
if (value < 1)
|
||||
RETURN_EMPTY;
|
||||
|
||||
return (extract(word, 0, value-1)); /* DONT USE RETURN_STR HERE! */
|
||||
return (extract(word, 0, value-1)); /* DON'T USE RETURN_STR HERE! */
|
||||
}
|
||||
|
||||
/* $rightw(num string of text)
|
||||
|
@ -2126,7 +2126,7 @@ BUILT_IN_FUNCTION(function_notw, word)
|
|||
else /* where == 0 */
|
||||
booya = extract(word, 1, EOS);
|
||||
|
||||
return booya; /* DONT USE RETURN_STR HERE! */
|
||||
return booya; /* DON'T USE RETURN_STR HERE! */
|
||||
}
|
||||
|
||||
/* $restw(num string of text)
|
||||
|
@ -2232,7 +2232,7 @@ BUILT_IN_FUNCTION(function_insertw, word)
|
|||
new_free(&str2);
|
||||
}
|
||||
|
||||
return booya; /* DONT USE RETURN_STR HERE! */
|
||||
return booya; /* DON'T USE RETURN_STR HERE! */
|
||||
}
|
||||
|
||||
/* $chngw(num word string of text)
|
||||
|
@ -2270,7 +2270,7 @@ BUILT_IN_FUNCTION(function_chngw, word)
|
|||
|
||||
|
||||
/* $common (string of text / string of text)
|
||||
* Given two sets of words seperated by a forward-slash '/', returns
|
||||
* Given two sets of words separated by a forward-slash '/', returns
|
||||
* all words that are found in both sets.
|
||||
* EX: $common(one two three / buckle my two shoe one) returns "one two"
|
||||
* NOTE: returned in order found in first string.
|
||||
|
@ -2306,11 +2306,11 @@ BUILT_IN_FUNCTION(function_common, word)
|
|||
if (!booya)
|
||||
RETURN_EMPTY;
|
||||
|
||||
return (booya); /* DONT USE RETURN_STR HERE! */
|
||||
return (booya); /* DON'T USE RETURN_STR HERE! */
|
||||
}
|
||||
|
||||
/* $diff(string of text / string of text)
|
||||
* given two sets of words, seperated by a forward-slash '/', returns
|
||||
* given two sets of words, separated by a forward-slash '/', returns
|
||||
* all words that are not found in both sets
|
||||
* EX: $diff(one two three / buckle my two shoe)
|
||||
* returns "one two three buckle my shoe"
|
||||
|
@ -3069,7 +3069,7 @@ char *function_pop(char *n, char *word)
|
|||
if (!(pointer = strrchr(value, ' ')))
|
||||
{
|
||||
window_display = 0;
|
||||
add_var_alias(var, empty_string); /* dont forget this! */
|
||||
add_var_alias(var, empty_string); /* don't forget this! */
|
||||
window_display = old_display;
|
||||
return value; /* one word -- return it */
|
||||
}
|
||||
|
@ -3080,7 +3080,7 @@ char *function_pop(char *n, char *word)
|
|||
window_display = old_display;
|
||||
|
||||
/* because pointer points to value, we *must* make a copy of it
|
||||
* *before* we free value! (And we cant forget to free value, either)
|
||||
* *before* we free value! (And we can't forget to free value, either)
|
||||
*/
|
||||
blech = m_strdup(pointer);
|
||||
new_free(&value);
|
||||
|
@ -3797,12 +3797,12 @@ BUILT_IN_FUNCTION(function_truncate, words)
|
|||
|
||||
|
||||
/*
|
||||
* Apprantly, this was lifted from a CS client. I reserve the right
|
||||
* Apparently, this was lifted from a CS client. I reserve the right
|
||||
* to replace this code in future versions. (hop)
|
||||
*/
|
||||
/*
|
||||
I added this little function so that I can have stuff formatted
|
||||
into days, hours, minutes, seconds; but with d, h, m, s abreviations.
|
||||
into days, hours, minutes, seconds; but with d, h, m, s abbreviations.
|
||||
-Taner
|
||||
*/
|
||||
|
||||
|
@ -3850,7 +3850,7 @@ BUILT_IN_FUNCTION(function_tdiff2, input)
|
|||
|
||||
|
||||
/*
|
||||
* Apparantly, this was lifted from a CS client. I reserve the right
|
||||
* Apparently, this was lifted from a CS client. I reserve the right
|
||||
* to replace this code in a future release.
|
||||
*/
|
||||
BUILT_IN_FUNCTION(function_utime, input)
|
||||
|
@ -4015,13 +4015,13 @@ BUILT_IN_FUNCTION(function_strlen, input)
|
|||
}
|
||||
|
||||
/*
|
||||
* Next two contributed by Scott H Kilau (sheik), who for some reason doesnt
|
||||
* Next two contributed by Scott H Kilau (sheik), who for some reason doesn't
|
||||
* want to take credit for them. *shrug* >;-)
|
||||
*
|
||||
* Deciding not to be controversial, im keeping the original (contributed)
|
||||
* Deciding not to be controversial, I'm keeping the original (contributed)
|
||||
* semantics of these two functions, which is to return 1 on success and
|
||||
* -1 on error. If you dont like it, then tough. =) I didnt write it, and
|
||||
* im not going to second guess any useful contributions. >;-)
|
||||
* -1 on error. If you don't like it, then tough. =) I didnt write it, and
|
||||
* I'm not going to second guess any useful contributions. >;-)
|
||||
*/
|
||||
BUILT_IN_FUNCTION(function_fexist, words)
|
||||
{
|
||||
|
@ -4122,7 +4122,7 @@ BUILT_IN_FUNCTION(function_fsize, words)
|
|||
* Contributed by CrowMan
|
||||
* I changed two instances of "RETURN_INT(result)"
|
||||
* (where result was a null pointer) to RETURN_STR(empty_string)
|
||||
* because i dont think he meant to return a null pointer as an int value.
|
||||
* because I don't think he meant to return a null pointer as an int value.
|
||||
*/
|
||||
/*
|
||||
* $crypt(password seed)
|
||||
|
@ -4166,7 +4166,7 @@ BUILT_IN_FUNCTION(function_info, words)
|
|||
else
|
||||
*/
|
||||
return m_sprintf("%s+%s", version, compile_time_options);
|
||||
/* more to be added as neccesary */
|
||||
/* more to be added as necessary */
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -4519,7 +4519,7 @@ BUILT_IN_FUNCTION(function_sort, words)
|
|||
|
||||
wordc = splitw(words, &wordl);
|
||||
qsort((void *)wordl, wordc, sizeof(char *), sort_it);
|
||||
return unsplitw(&wordl, wordc); /* DONT USE RETURN_STR() HERE */
|
||||
return unsplitw(&wordl, wordc); /* DON'T USE RETURN_STR() HERE */
|
||||
}
|
||||
|
||||
BUILT_IN_FUNCTION(function_notify, words)
|
||||
|
@ -4562,7 +4562,7 @@ BUILT_IN_FUNCTION(function_notify, words)
|
|||
}
|
||||
}
|
||||
|
||||
/* dont use RETURN_STR() here. */
|
||||
/* don't use RETURN_STR() here. */
|
||||
return ret ? ret : get_notify_nicks(showserver, showon, NULL, 0);
|
||||
}
|
||||
|
||||
|
@ -4606,7 +4606,7 @@ BUILT_IN_FUNCTION(function_watch, words)
|
|||
}
|
||||
}
|
||||
|
||||
/* dont use RETURN_STR() here. */
|
||||
/* don't use RETURN_STR() here. */
|
||||
return ret ? ret : get_watch_nicks(showserver, showon, NULL, 0);
|
||||
}
|
||||
|
||||
|
@ -4644,7 +4644,7 @@ BUILT_IN_FUNCTION(function_numsort, words)
|
|||
wordc = splitw(words, &wordl);
|
||||
qsort((void *)wordl, wordc, sizeof(char *), num_sort_it);
|
||||
|
||||
return unsplitw(&wordl, wordc); /* DONT USE RETURN_STR() HERE */
|
||||
return unsplitw(&wordl, wordc); /* DON'T USE RETURN_STR() HERE */
|
||||
}
|
||||
|
||||
#ifdef NEED_GLOB
|
||||
|
@ -4781,24 +4781,24 @@ register ShitList *Shit;
|
|||
}
|
||||
|
||||
/*
|
||||
$pad(N string of text goes here)
|
||||
if N is negative, it'll pad to the right
|
||||
if N is positive, it'll pad to the left
|
||||
|
||||
so something like: $pad(20 letters) would output:
|
||||
letters
|
||||
and $pad(20 some string) would be:
|
||||
some string
|
||||
GREAT way to allign shit, and if you use $curpos() can can add that and
|
||||
figure out the indent :p
|
||||
hohoho, aren't we ingenious, better yet, you can do a strlen() on the
|
||||
string youw anna output, then - the curpos, and if its over, grab all
|
||||
words to the right of that position and output them [so its on one line]
|
||||
then indent, grab the next section of words( and then the next and then
|
||||
next
|
||||
|
||||
Jordy (jordy@thirdwave.net) 19960622
|
||||
*/
|
||||
* $pad(N string of text goes here)
|
||||
* if N is negative, it'll pad to the right
|
||||
* if N is positive, it'll pad to the left
|
||||
*
|
||||
* so something like: $pad(20 letters) would output:
|
||||
* " letters"
|
||||
* and $pad(20 some string) would be:
|
||||
* " some string"
|
||||
* GREAT way to align shit, and if you use $curpos() you can add that and
|
||||
* figure out the indent :p
|
||||
* hohoho, aren't we ingenious, better yet, you can do a strlen() on the
|
||||
* string you wanna output, then - the curpos, and if it's over, grab all
|
||||
* words to the right of that position and output them [so it's on one line]
|
||||
* then indent, grab the next section of words (and then the next and then
|
||||
* next).
|
||||
*
|
||||
* Jordy (jordy@thirdwave.net) 19960622
|
||||
*/
|
||||
|
||||
BUILT_IN_FUNCTION(function_pad, word)
|
||||
{
|
||||
|
@ -5618,7 +5618,7 @@ BUILT_IN_FUNCTION(function_regexec, input)
|
|||
new_free((char **)&preg);
|
||||
}
|
||||
}
|
||||
RETURN_INT(retval); /* DONT PASS FUNC CALL TO RETURN_INT */
|
||||
RETURN_INT(retval); /* DON'T PASS FUNC CALL TO RETURN_INT */
|
||||
}
|
||||
|
||||
BUILT_IN_FUNCTION(function_regerror, input)
|
||||
|
@ -5672,7 +5672,7 @@ BUILT_IN_FUNCTION(function_regfree, input) { RETURN_EMPTY; }
|
|||
*/
|
||||
BUILT_IN_FUNCTION(function_igmask, input)
|
||||
{
|
||||
return get_ignores_by_pattern(input, 0); /* DONT MALLOC THIS */
|
||||
return get_ignores_by_pattern(input, 0); /* DON'T MALLOC THIS */
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -5683,7 +5683,7 @@ BUILT_IN_FUNCTION(function_igmask, input)
|
|||
*/
|
||||
BUILT_IN_FUNCTION(function_rigmask, input)
|
||||
{
|
||||
return get_ignores_by_pattern(input, 1); /* DONT MALLOC THIS */
|
||||
return get_ignores_by_pattern(input, 1); /* DON'T MALLOC THIS */
|
||||
}
|
||||
|
||||
BUILT_IN_FUNCTION(function_count, input)
|
||||
|
@ -5808,7 +5808,7 @@ BUILT_IN_FUNCTION(function_winrefs, args)
|
|||
while (traverse_all_windows(&w))
|
||||
m_s3cat(&retval, space, ltoa(w->refnum));
|
||||
|
||||
return retval; /* DONT MALLOC THIS! */
|
||||
return retval; /* DON'T MALLOC THIS! */
|
||||
}
|
||||
|
||||
|
||||
|
@ -5917,7 +5917,7 @@ BUILT_IN_FUNCTION(function_mask, args)
|
|||
if (strchr("~^-+=", *user))
|
||||
user++;
|
||||
|
||||
/* Make sure 'user' isnt too long for a ban... */
|
||||
/* Make sure 'user' isn't too long for a ban... */
|
||||
if (strlen(user) > 7)
|
||||
{
|
||||
user[7] = '*';
|
||||
|
@ -6030,7 +6030,7 @@ BUILT_IN_FUNCTION(function_remws, word)
|
|||
if (!booya)
|
||||
RETURN_EMPTY;
|
||||
|
||||
return (booya); /* DONT USE RETURN_STR HERE! */
|
||||
return (booya); /* DON'T USE RETURN_STR HERE! */
|
||||
}
|
||||
|
||||
BUILT_IN_FUNCTION(function_stripansicodes, input)
|
||||
|
@ -6049,7 +6049,7 @@ BUILT_IN_FUNCTION(function_igtype, input)
|
|||
|
||||
BUILT_IN_FUNCTION(function_rigtype, input)
|
||||
{
|
||||
return get_ignore_patterns_by_type(input); /* DONT MALLOC! */
|
||||
return get_ignore_patterns_by_type(input); /* DON'T MALLOC! */
|
||||
}
|
||||
|
||||
BUILT_IN_FUNCTION(function_getuid, input)
|
||||
|
@ -6238,7 +6238,7 @@ BUILT_IN_FUNCTION(function_rest, input)
|
|||
}
|
||||
|
||||
/*
|
||||
* take a servername and return it's refnum or -1
|
||||
* take a servername and return its refnum or -1
|
||||
*/
|
||||
BUILT_IN_FUNCTION(function_servref, input)
|
||||
{
|
||||
|
@ -6341,7 +6341,7 @@ BUILT_IN_FUNCTION(function_stripcrap, input)
|
|||
output = new_malloc(strlen(input) * 2 + 1);
|
||||
strcpy(output, input);
|
||||
mangle_line(output, mangle, strlen(input) * 2);
|
||||
return output; /* DONT MALLOC THIS */
|
||||
return output; /* DON'T MALLOC THIS */
|
||||
}
|
||||
|
||||
|
||||
|
@ -7118,7 +7118,7 @@ BUILT_IN_FUNCTION(function_prefix, input)
|
|||
* characters with words[0] (which is chosen arbitrarily).
|
||||
* As long as all words start with the same leading chars,
|
||||
* we march along trying longer and longer substrings,
|
||||
* until one of them doesnt work, and then we exit right
|
||||
* until one of them doesn't work, and then we exit right
|
||||
* there.
|
||||
*/
|
||||
if (my_strnicmp(words[0], words[word_index], len_index))
|
||||
|
@ -7178,7 +7178,7 @@ BUILT_IN_FUNCTION(function_functioncall, input)
|
|||
* word-number would be used, such as $chngw(). The empty value is returned
|
||||
* if a syntax error returns.
|
||||
*
|
||||
* DONT ASK ME to support 'position' less than 0 to indicate a position
|
||||
* DON'T ASK ME to support 'position' less than 0 to indicate a position
|
||||
* from the end of the string. Either that can be supported, or you can
|
||||
* directly use $index() as the first argument; you can't do both. I chose
|
||||
* the latter intentionally. If you really want to calculate from the end of
|
||||
|
@ -7201,7 +7201,7 @@ BUILT_IN_FUNCTION(function_indextoword, input)
|
|||
if (pos > len)
|
||||
RETURN_EMPTY;
|
||||
|
||||
/* Truncate the string if neccesary */
|
||||
/* Truncate the string if necessary */
|
||||
if (pos + 1 < len)
|
||||
input[pos + 1] = 0;
|
||||
|
||||
|
@ -7254,7 +7254,7 @@ BUILT_IN_FUNCTION(function_insert, word)
|
|||
|
||||
m_3cat(&result, inserted, word + where);
|
||||
|
||||
return result; /* DONT USE RETURN_STR HERE! */
|
||||
return result; /* DON'T USE RETURN_STR HERE! */
|
||||
}
|
||||
|
||||
BUILT_IN_FUNCTION(function_stat, input)
|
||||
|
|
|
@ -234,8 +234,8 @@ void print_funny_names(char *line)
|
|||
fget_string_var(FORMAT_NAMES_BANNER_FSET), NULL, NULL),
|
||||
sizeof buffer);
|
||||
|
||||
/* Seperate the nick and the possible status presets that might
|
||||
* preceede it. */
|
||||
/* Separate the nick and the possible status presets that might
|
||||
* precede it. */
|
||||
nick = t + strspn(t, "@%+~-");
|
||||
nick_format = fget_string_var(isme(nick) ?
|
||||
FORMAT_NAMES_NICK_ME_FSET : FORMAT_NAMES_NICK_FSET);
|
||||
|
|
|
@ -655,7 +655,7 @@ static int glob3 ( Char *pathbuf,
|
|||
|
||||
|
||||
/*
|
||||
* Extend the gl_pathv member of a glob_t structure to accomodate a new item,
|
||||
* Extend the gl_pathv member of a glob_t structure to accommodate a new item,
|
||||
* add the new item, and update gl_pathc.
|
||||
*
|
||||
* This assumes the BSD realloc, which only copies the block when its size
|
||||
|
|
|
@ -762,7 +762,7 @@ char * fencode (unsigned char * input)
|
|||
}
|
||||
result[i] = '\0';
|
||||
|
||||
return result; /* DONT USE RETURN_STR HERE! */
|
||||
return result; /* DON'T USE RETURN_STR HERE! */
|
||||
}
|
||||
|
||||
typedef struct _gtkparam {
|
||||
|
@ -2259,7 +2259,7 @@ GtkWidget *newsubmenu(MenuStruct *menutoadd)
|
|||
menus in GTK */
|
||||
if(tmp->refnum > 0)
|
||||
{
|
||||
/* If we already have an entry defined, use it's info */
|
||||
/* If we already have an entry defined, use its info */
|
||||
MenuRef *tmpref = find_menuref(menutoadd->root, tmp->refnum);
|
||||
if(tmpref)
|
||||
{
|
||||
|
|
|
@ -79,9 +79,9 @@ static int use_help_window = 0;
|
|||
|
||||
|
||||
/*
|
||||
* show_help: show's either a page of text from a help_fp, or the whole
|
||||
* show_help: Shows either a page of text from a help_fp, or the whole
|
||||
* thing, depending on the value of HELP_PAGER_VAR. If it gets to the end,
|
||||
* (in either case it will eventally), it closes the file, and returns 0
|
||||
* (in either case it will eventually), it closes the file, and returns 0
|
||||
* to indicate this.
|
||||
*/
|
||||
static int show_help (Window *window, char *name)
|
||||
|
@ -109,7 +109,7 @@ static int show_help (Window *window, char *name)
|
|||
*(line + strlen(line) - 1) = (char) 0;
|
||||
|
||||
/*
|
||||
* This is for compatability with ircII-4.4
|
||||
* This is for compatibility with ircII-4.4
|
||||
*/
|
||||
if (*line == '!' || *line == '#')
|
||||
continue;
|
||||
|
@ -232,7 +232,7 @@ static void help_topic (char *path, char *name)
|
|||
/* let uzfopen have all the fun */
|
||||
if ((help_fp = uzfopen (&filename, path, 0)))
|
||||
{
|
||||
/* Isnt this a heck of a lot better then the kludge you were using? */
|
||||
/* Isn't this a heck of a lot better then the kludge you were using? */
|
||||
help_put_it(name, "*** Help on %s", name);
|
||||
help_prompt(name, NULL);
|
||||
}
|
||||
|
@ -301,7 +301,7 @@ static void help_show_paused_topic (char *name, char *line)
|
|||
}
|
||||
|
||||
/*
|
||||
* This cant be an else of the previous if because 'i' can
|
||||
* This can't be an else of the previous if because 'i' can
|
||||
* change in the previous if and we need to test it again
|
||||
*/
|
||||
if (i >= help_paused_lines)
|
||||
|
@ -398,7 +398,7 @@ static void help_me (char *topics, char *args)
|
|||
/*
|
||||
* This is just a bogus while loop which is intended to allow
|
||||
* the user to do '/help alias expressions' without having to
|
||||
* include a slash inbetween the topic and subtopic.
|
||||
* include a slash between the topic and subtopic.
|
||||
*
|
||||
* If all goes well, we 'break' at the bottom of the loop.
|
||||
*/
|
||||
|
|
|
@ -105,7 +105,7 @@ static char *history_match (char *match)
|
|||
/* shove_to_history: a key binding that saves the current line into
|
||||
* the history and then deletes the whole line. Useful for when you
|
||||
* are in the middle of a big line and need to "get out" to do something
|
||||
* else quick for just a second, and you dont want to have to retype
|
||||
* else quick for just a second, and you don't want to have to retype
|
||||
* everything all over again
|
||||
*/
|
||||
extern void shove_to_history (char unused, char *not_used)
|
||||
|
|
|
@ -796,7 +796,7 @@ static int show_list (int which)
|
|||
Hook *list;
|
||||
int cnt = 0;
|
||||
|
||||
/* Less garbage when issueing /on without args. (lynx) */
|
||||
/* Less garbage when issuing /on without args. (lynx) */
|
||||
for (list = hook_functions[which].list; list; list = list->next, cnt++)
|
||||
show_hook(list, hook_functions[which].name);
|
||||
return (cnt);
|
||||
|
@ -862,7 +862,7 @@ int BX_do_hook (int which, char *format, ...)
|
|||
/*
|
||||
* If we're already executing the type, and we're
|
||||
* specifically not supposed to allow recursion, then
|
||||
* dont allow recursion. ;-)
|
||||
* don't allow recursion. ;-)
|
||||
*/
|
||||
if (hook_functions[which].mark &&
|
||||
(hook_functions[which].flags & HF_NORECURSE))
|
||||
|
@ -881,7 +881,7 @@ int BX_do_hook (int which, char *format, ...)
|
|||
|
||||
/*
|
||||
* Press the buffer using the specified format string and args
|
||||
* We do this here so that we dont waste time doing the vsnprintf
|
||||
* We do this here so that we don't waste time doing the vsnprintf
|
||||
* if we're not going to do any matching. So for types where the
|
||||
* user has no hooks, its a cheapie call.
|
||||
*/
|
||||
|
@ -917,7 +917,7 @@ int BX_do_hook (int which, char *format, ...)
|
|||
hook_functions[which].mark++;
|
||||
|
||||
|
||||
/* not attached, so dont "fix" it */
|
||||
/* not attached, so don't "fix" it */
|
||||
{
|
||||
int currser = 0,
|
||||
oldser = INT_MIN,
|
||||
|
@ -985,7 +985,7 @@ int BX_do_hook (int which, char *format, ...)
|
|||
}
|
||||
|
||||
/*
|
||||
* Ok. we've walked the list. If the last hook had a best
|
||||
* OK. We've walked the list. If the last hook had a best
|
||||
* match, use that one too. =)
|
||||
*/
|
||||
if (bestmatch)
|
||||
|
@ -1012,7 +1012,7 @@ int BX_do_hook (int which, char *format, ...)
|
|||
ircpanic("hook_array[%d] is null", i);
|
||||
|
||||
/*
|
||||
* Check to see if this hook is supposed to supress the
|
||||
* Check to see if this hook is supposed to suppress the
|
||||
* default action for the event.
|
||||
*/
|
||||
|
||||
|
@ -1022,8 +1022,8 @@ hook_next:
|
|||
else if (tmp->noisy == UNKNOWN && tmp->sernum == 0)
|
||||
retval = RESULT_PENDING;
|
||||
/*
|
||||
* If this is a negated event, or there isnt anything to be
|
||||
* executed, then we dont bother. Just go on to the next one
|
||||
* If this is a negated event, or there isn't anything to be
|
||||
* executed, then we don't bother. Just go on to the next one
|
||||
*/
|
||||
if (tmp->not || !tmp->stuff || !*tmp->stuff)
|
||||
{
|
||||
|
@ -1066,7 +1066,7 @@ hook_next:
|
|||
else
|
||||
{
|
||||
/*
|
||||
* Ok. Go and run the code. It is imperitive to note
|
||||
* OK. Go and run the code. It is imperative to note
|
||||
* that "tmp" may be deleted by the code executed here,
|
||||
* so it is absolutely forbidden to reference "tmp" after
|
||||
* this point.
|
||||
|
@ -1123,7 +1123,7 @@ hook_next:
|
|||
}
|
||||
|
||||
/*
|
||||
* shook: the SHOOK command -- this probably doesnt belong here,
|
||||
* shook: the SHOOK command -- this probably doesn't belong here,
|
||||
* and shook is probably a stupid name. It simply asserts a fake
|
||||
* hook event for a given type. Fraught with peril!
|
||||
*/
|
||||
|
@ -1174,7 +1174,7 @@ BUILT_IN_COMMAND(shookcmd)
|
|||
* specifying a character at the beginning of the "type" argument. If you
|
||||
* want to schedule an event at a serial number, then the first character
|
||||
* must be a hash (#). The argument immediately FOLLOWING the "type"
|
||||
* argument, and immediately PRECEEDING the "nick" argument must be an
|
||||
* argument, and immediately PRECEDING the "nick" argument must be an
|
||||
* integer number, and is used for the serial number for this event.
|
||||
*
|
||||
* The "verbosity" of the event may also be modified by specifying at most
|
||||
|
@ -1262,7 +1262,7 @@ BUILT_IN_COMMAND(oncmd)
|
|||
if ((which = find_hook(func, &first)) == INVALID_HOOKNUM)
|
||||
{
|
||||
/*
|
||||
* Ok. So either the user specified an invalid type
|
||||
* OK. So either the user specified an invalid type
|
||||
* or they specified an ambiguous type. Either way,
|
||||
* we're not going to be going anywhere. So we have
|
||||
* free reign to mangle 'args' at this point.
|
||||
|
@ -1286,7 +1286,7 @@ BUILT_IN_COMMAND(oncmd)
|
|||
return;
|
||||
|
||||
/*
|
||||
* Ok. So they probably want a listing.
|
||||
* OK. So they probably want a listing.
|
||||
*/
|
||||
say("ON listings:");
|
||||
len = strlen(func);
|
||||
|
@ -1362,7 +1362,7 @@ BUILT_IN_COMMAND(oncmd)
|
|||
|
||||
|
||||
/*
|
||||
* If this is a negative event, then we dont want
|
||||
* If this is a negative event, then we don't want
|
||||
* to take any action for it.
|
||||
*/
|
||||
if (not)
|
||||
|
|
14
source/if.c
14
source/if.c
|
@ -348,9 +348,9 @@ BUILT_IN_COMMAND(foreach)
|
|||
* FE: replaces recursion
|
||||
*
|
||||
* The thing about it is that you can nest variables, as this command calls
|
||||
* expand_alias until the list doesnt change. So you can nest lists in
|
||||
* expand_alias until the list doesn't change. So you can nest lists in
|
||||
* lists, and hopefully that will work. However, it also makes it
|
||||
* impossible to have $s anywhere in the list. Maybe ill change that
|
||||
* impossible to have $s anywhere in the list. Maybe I'll change that
|
||||
* some day.
|
||||
*/
|
||||
|
||||
|
@ -504,15 +504,15 @@ BUILT_IN_COMMAND(fe)
|
|||
* in the same style of C's for, the for loop is just a specific
|
||||
* type of WHILE loop.
|
||||
*
|
||||
* IMPORTANT: Since ircII uses ; as a delimeter between commands,
|
||||
* IMPORTANT: Since ircII uses ; as a delimiter between commands,
|
||||
* commas were chosen to be the delimiter between expressions,
|
||||
* so that semicolons may be used in the expressions (think of this
|
||||
* as the reverse as C, where commas seperate commands in expressions,
|
||||
* as the reverse as C, where commas separate commands in expressions,
|
||||
* and semicolons end expressions.
|
||||
*/
|
||||
/* I suppose someone could make a case that since the
|
||||
* foreach_handler() routine weeds out any for command that doesnt have
|
||||
* two commans, that checking for those 2 commas is a waste. I suppose.
|
||||
* foreach_handler() routine weeds out any for command that doesn't have
|
||||
* two commas, that checking for those 2 commas is a waste. I suppose.
|
||||
*/
|
||||
BUILT_IN_COMMAND(forcmd)
|
||||
{
|
||||
|
@ -598,7 +598,7 @@ BUILT_IN_COMMAND(forcmd)
|
|||
break;
|
||||
}
|
||||
if (continue_exception)
|
||||
continue_exception = 0; /* Dont continue here! */
|
||||
continue_exception = 0; /* Don't continue here! */
|
||||
if (return_exception)
|
||||
break;
|
||||
parse_line(NULL, iteration, sa, 0, 0, 0);
|
||||
|
|
|
@ -753,10 +753,10 @@ void set_highlight_char(Window *win, char *s, int unused)
|
|||
}
|
||||
|
||||
/* check_ignore -- replaces the old double_ignore
|
||||
* Why did i change the name?
|
||||
* * double_ignore isnt really applicable any more becuase it doesnt
|
||||
* Why did I change the name?
|
||||
* * double_ignore isn't really applicable any more because it doesn't
|
||||
* do two ignore lookups, it only does one.
|
||||
* * This function doesnt look anything like the old double_ignore
|
||||
* * This function doesn't look anything like the old double_ignore
|
||||
* * This function works for the new *!*@* patterns stored by
|
||||
* ignore instead of the old nick and userhost patterns.
|
||||
* (jfn may 1995)
|
||||
|
@ -1029,7 +1029,7 @@ char *get_ignore_patterns_by_type (char *ctype)
|
|||
|
||||
/*
|
||||
* Convert the user's input into something we can use.
|
||||
* If the user doesnt specify anything useful, then we
|
||||
* If the user doesn't specify anything useful, then we
|
||||
* just punt right here.
|
||||
*/
|
||||
upper(ctype);
|
||||
|
|
|
@ -315,7 +315,7 @@ extern void BX_update_input (int update)
|
|||
* The number of characters since the origin of the input buffer
|
||||
* is the number of printable chars in the input prompt plus the
|
||||
* current position in the input buffer. We subtract from that
|
||||
* the WIDTH delta to take off the first delta, which doesnt
|
||||
* the WIDTH delta to take off the first delta, which doesn't
|
||||
* count towards the width of the zone. Then we divide that by
|
||||
* the size of the zone, to get an integer, then we multiply it
|
||||
* back. This gives us the first character on the screen. We
|
||||
|
@ -1332,7 +1332,7 @@ void edit_char(char key)
|
|||
#ifdef TIOCSTI
|
||||
ioctl(0, TIOCSTI, &key);
|
||||
#else
|
||||
say("Sorry, your system doesnt support 'faking' user input...");
|
||||
say("Sorry, your system doesn't support 'faking' user input...");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
|
26
source/irc.c
26
source/irc.c
|
@ -96,7 +96,7 @@ int irc_port = IRC_PORT, /* port of ircd */
|
|||
waiting_out = 0, /* used by /WAIT command */
|
||||
waiting_in = 0, /* used by /WAIT command */
|
||||
who_mask = 0, /* keeps track of which /who
|
||||
* switchs are set */
|
||||
* switches are set */
|
||||
dead = 0,
|
||||
inhibit_logging = 0,
|
||||
#ifndef ONLY_STD_CHARS
|
||||
|
@ -364,8 +364,8 @@ static SIGNAL_HANDLER(irc_exit_old)
|
|||
|
||||
volatile int dead_children_processes;
|
||||
|
||||
/* This is needed so that the fork()s we do to read compressed files dont
|
||||
* sit out there as zombies and chew up our fd's while we read more.
|
||||
/* This is needed so that the fork()s we do to read compressed files don't
|
||||
* sit out there as zombies and chew up our fds while we read more.
|
||||
*/
|
||||
SIGNAL_HANDLER(child_reap)
|
||||
{
|
||||
|
@ -596,8 +596,8 @@ int old_strip_ansi = strip_ansi_in_echo;
|
|||
* major rewrite 12/22/94 -jfn
|
||||
*
|
||||
*
|
||||
* Im going to break backwards compatability here: I think that im
|
||||
* safer in doing this becuase there are a lot less shell script with
|
||||
* I'm going to break backwards compatibility here: I think that I'm
|
||||
* safer in doing this because there are a lot less shell scripts with
|
||||
* the command line flags then there are ircII scripts with old commands/
|
||||
* syntax that would be a nasty thing to break..
|
||||
*
|
||||
|
@ -611,12 +611,12 @@ int old_strip_ansi = strip_ansi_in_echo;
|
|||
* Each flag may or may not have a space between the flag and the argument.
|
||||
* -lfoo is the same as -l foo
|
||||
* Anything surrounded by quotation marks is honored as one word.
|
||||
* The -c, -p, -L, -l, -s, -z flags all take arguments. If no argumenTs
|
||||
* The -c, -p, -L, -l, -s, -z flags all take arguments. If no arguments
|
||||
* are given between the flag and the next flag, an error
|
||||
* message is printed and the program is halted.
|
||||
* Exception: the -s flag will be accepted without a argument.
|
||||
* (ick: backwards compatability sucks. ;-)
|
||||
* Arguments occuring after a flag that does not take an argument
|
||||
* Exception: the -s flag will be accepted without an argument.
|
||||
* (ick: backwards compatibility sucks. ;-)
|
||||
* Arguments occurring after a flag that does not take an argument
|
||||
* will be parsed in the following way: the first instance
|
||||
* will be an assumed nickname, and the second instance will
|
||||
* will be an assumed server. (some semblance of back compat.)
|
||||
|
@ -627,7 +627,7 @@ int old_strip_ansi = strip_ansi_in_echo;
|
|||
* The -n flag means "nickname"
|
||||
*
|
||||
* Bugs:
|
||||
* The -s flag is hard to use without an argument unless youre careful.
|
||||
* The -s flag is hard to use without an argument unless you're careful.
|
||||
*/
|
||||
#ifdef CLOAKED
|
||||
extern char **Argv;
|
||||
|
@ -721,7 +721,7 @@ static char *parse_args (char *argv[], int argc, char **envp)
|
|||
break;
|
||||
}
|
||||
|
||||
case 'F': /* dont use flow control */
|
||||
case 'F': /* don't use flow control */
|
||||
{
|
||||
use_flow_control = 0;
|
||||
if (argv[ac][2])
|
||||
|
@ -1055,7 +1055,7 @@ static char *parse_args (char *argv[], int argc, char **envp)
|
|||
strlcat(realname, ptr + 1, sizeof realname);
|
||||
|
||||
/* Make the first character of the username uppercase, if
|
||||
it's preceeded by a space */
|
||||
it's preceded by a space */
|
||||
if (len < sizeof realname && *(entry->pw_name) &&
|
||||
(len == 0 || isspace((unsigned char)realname[len - 1])))
|
||||
{
|
||||
|
@ -1168,7 +1168,7 @@ static char *parse_args (char *argv[], int argc, char **envp)
|
|||
* dcc, ttys, notify, the whole ball o wax, but it does NOT iterate!
|
||||
*
|
||||
* You should usually NOT call io() unless you are specifically waiting
|
||||
* for something from a file descriptor. It doesnt look like bad things
|
||||
* for something from a file descriptor. It doesn't look like bad things
|
||||
* will happen if you call this elsewhere, but its long time behavior has
|
||||
* not been observed. It *does* however, appear to be much more reliable
|
||||
* then the old irc_io, and i even know how this works. >;-)
|
||||
|
|
|
@ -73,7 +73,7 @@ void start_memdebug(void)
|
|||
/*
|
||||
* really_new_malloc is the general interface to the malloc(3) call.
|
||||
* It is only called by way of the ``new_malloc'' #define.
|
||||
* It wont ever return NULL.
|
||||
* It won't ever return NULL.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -600,7 +600,7 @@ char *BX_new_next_arg (char *str, char **new_ptr)
|
|||
}
|
||||
|
||||
/*
|
||||
* This function is "safe" because it doesnt ever return NULL.
|
||||
* This function is "safe" because it doesn't ever return NULL.
|
||||
* XXXX - this is an ugly kludge that needs to go away
|
||||
*/
|
||||
char *safe_new_next_arg (char *str, char **new_ptr)
|
||||
|
@ -791,9 +791,9 @@ char *BX_chop (char *stuff, int nchar)
|
|||
|
||||
/*
|
||||
* strext: Makes a copy of the string delmited by two char pointers and
|
||||
* returns it in malloced memory. Useful when you dont want to munge up
|
||||
* the original string with a null. end must be one place beyond where
|
||||
* you want to copy, ie, its the first character you dont want to copy.
|
||||
* returns it in malloced memory. Useful when you don't want to munge up
|
||||
* the original string with a null. End must be one place beyond where
|
||||
* you want to copy, ie, it's the first character you don't want to copy.
|
||||
*/
|
||||
char *strext(char *start, char *end)
|
||||
{
|
||||
|
@ -1028,7 +1028,7 @@ char *BX_expand_twiddle (char *str)
|
|||
else
|
||||
strlcpy(buffer, str, sizeof buffer);
|
||||
|
||||
/* This isnt legal! */
|
||||
/* This isn't legal! */
|
||||
str2 = NULL;
|
||||
malloc_strcpy(&str2, buffer);
|
||||
#ifdef __EMX__
|
||||
|
@ -1069,7 +1069,7 @@ char *BX_check_nickname (char *nick)
|
|||
/*
|
||||
* sindex: much like index(), but it looks for a match of any character in
|
||||
* the group, and returns that position. If the first character is a ^, then
|
||||
* this will match the first occurence not in that group.
|
||||
* this will match the first occurrence not in that group.
|
||||
*/
|
||||
char *BX_sindex (register char *string, char *group)
|
||||
{
|
||||
|
@ -1108,7 +1108,7 @@ char *BX_sindex (register char *string, char *group)
|
|||
/*
|
||||
* rsindex: much like rindex(), but it looks for a match of any character in
|
||||
* the group, and returns that position. If the first character is a ^, then
|
||||
* this will match the first occurence not in that group.
|
||||
* this will match the first occurrence not in that group.
|
||||
*/
|
||||
char *BX_rsindex (register char *string, char *start, char *group, int howmany)
|
||||
{
|
||||
|
@ -1301,7 +1301,7 @@ void BX_ircpanic (char *format, ...)
|
|||
va_end(arglist);
|
||||
}
|
||||
|
||||
yell("An unrecoverable logic error has occured.");
|
||||
yell("An unrecoverable logic error has occurred.");
|
||||
yell("Please email " BUG_EMAIL " and include the following message:");
|
||||
|
||||
yell("Panic: [%s:%s %s]", irc_version, buffer, cx_function);
|
||||
|
@ -1432,7 +1432,7 @@ FILE *BX_uzfopen (char **filename, char *path, int hook)
|
|||
}
|
||||
|
||||
/* It is allowed to pass to this function either a true filename
|
||||
with the compression extention, or to pass it the base name of
|
||||
with the compression extension, or to pass it the base name of
|
||||
the filename, and this will look to see if there is a compressed
|
||||
file that matches the base name */
|
||||
|
||||
|
@ -1493,7 +1493,7 @@ FILE *BX_uzfopen (char **filename, char *path, int hook)
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
/* Right now it doesnt look like the file is a full compressed fn */
|
||||
/* Right now it doesn't look like the file is a full compressed fn */
|
||||
else
|
||||
{
|
||||
struct stat file_info;
|
||||
|
@ -1501,7 +1501,7 @@ FILE *BX_uzfopen (char **filename, char *path, int hook)
|
|||
/* Trivially, see if the file we were passed exists */
|
||||
filename_path = path_search (filename_trying, path);
|
||||
|
||||
/* Nope. it doesnt exist. */
|
||||
/* Nope. it doesn't exist. */
|
||||
if (!filename_path)
|
||||
{
|
||||
/* Is there a "filename.gz"? */
|
||||
|
@ -1611,7 +1611,7 @@ FILE *BX_uzfopen (char **filename, char *path, int hook)
|
|||
if ((doh = fopen(filename_path, "r")) != NULL)
|
||||
return doh;
|
||||
|
||||
/* nope.. we just cant seem to open this file... */
|
||||
/* nope.. we just can't seem to open this file... */
|
||||
if (hook)
|
||||
yell("Cannot open file %s: %s", filename_path, strerror(errno));
|
||||
new_free(filename);
|
||||
|
@ -1641,7 +1641,7 @@ extern int lw_strcmp(comp_func *compar, char *one, char *two)
|
|||
{
|
||||
char *pos = one + strlen(one) - 1;
|
||||
|
||||
if (pos > one) /* cant do pos[-1] if pos == one */
|
||||
if (pos > one) /* can't do pos[-1] if pos == one */
|
||||
while (!my_isspace(pos[-1]) && (pos > one))
|
||||
pos--;
|
||||
else
|
||||
|
@ -1678,7 +1678,7 @@ off_t file_size (char *filename)
|
|||
return -1;
|
||||
}
|
||||
|
||||
/* Gets the time in second/usecond if you can, second/0 if you cant. */
|
||||
/* Gets the time in second/usecond if you can, second/0 if you can't. */
|
||||
struct timeval BX_get_time(struct timeval *timer)
|
||||
{
|
||||
static struct timeval timer2;
|
||||
|
@ -2094,8 +2094,8 @@ char *strmccat(char *str, char c, int howmany)
|
|||
|
||||
/*
|
||||
* Pull a substring out of a larger string
|
||||
* If the ending delimiter doesnt occur, then we dont pass
|
||||
* anything (by definition). This is because we dont want
|
||||
* If the ending delimiter doesn't occur, then we don't pass
|
||||
* anything (by definition). This is because we don't want
|
||||
* to introduce a back door into CTCP handlers.
|
||||
*/
|
||||
extern char *BX_pullstr (char *source_string, char *dest_string)
|
||||
|
@ -2459,7 +2459,7 @@ int BX_figure_out_address (char *nuh, char **nick, char **user, char **host, cha
|
|||
char *bang, *at, *myhost = star, *endstring;
|
||||
int number;
|
||||
|
||||
/* Dont bother with channels, theyre ok. */
|
||||
/* Don't bother with channels, they're OK. */
|
||||
if (*nuh == '#' || *nuh == '&')
|
||||
return -1;
|
||||
|
||||
|
@ -2903,7 +2903,7 @@ const char *init_socketpath(void)
|
|||
/*
|
||||
* This mangles up 'incoming' corresponding to the current values of
|
||||
* /set mangle_inbound or /set mangle_outbound.
|
||||
* 'incoming' needs to be at _least_ thrice as big as neccesary
|
||||
* 'incoming' needs to be at _least_ thrice as big as necessary
|
||||
* (ie, sizeof(incoming) >= strlen(incoming) * 3 + 1)
|
||||
*/
|
||||
size_t BX_mangle_line (char *incoming, int how, size_t how_much)
|
||||
|
@ -3105,7 +3105,7 @@ int i = 0, j = 0, len;
|
|||
return buff;
|
||||
}
|
||||
|
||||
/* XXXX this doesnt belong here. im not sure where it goes, though. */
|
||||
/* XXXX this doesn't belong here. I'm not sure where it goes, though. */
|
||||
char * get_userhost (void)
|
||||
{
|
||||
strlcpy(userhost, username, sizeof userhost);
|
||||
|
@ -3118,9 +3118,9 @@ char * get_userhost (void)
|
|||
|
||||
/* RANDOM NUMBERS */
|
||||
/*
|
||||
* Random number generator #1 -- psuedo-random sequence
|
||||
* Random number generator #1 -- pseudo-random sequence
|
||||
* If you do not have /dev/random and do not want to use gettimeofday(), then
|
||||
* you can use the psuedo-random number generator. Its performance varies
|
||||
* you can use the pseudo-random number generator. Its performance varies
|
||||
* from weak to moderate. It is a predictable mathematical sequence that
|
||||
* varies depending on the seed, and it provides very little repetition,
|
||||
* but with 4 or 5 samples, it should be trivial for an outside person to
|
||||
|
@ -3202,7 +3202,7 @@ unsigned long randt(unsigned long l)
|
|||
* Random number generator #3 -- /dev/urandom.
|
||||
* If you have the /dev/urandom device, then we will use it. Its performance
|
||||
* varies from moderate to very strong. At best, it is a source of pretty
|
||||
* substantial unpredictable numbers. At worst, it is mathematical psuedo-
|
||||
* substantial unpredictable numbers. At worst, it is mathematical pseudo-
|
||||
* random sequence (which randm() is).
|
||||
*/
|
||||
unsigned long randd(unsigned long l)
|
||||
|
|
|
@ -65,7 +65,7 @@ char *mouse_actions[] =
|
|||
|
||||
/*
|
||||
* Yet again we've changed how the key maps are held. This time, hopefully
|
||||
* its the second to last time, as we've made the entire things independant
|
||||
* it's the second to last time, as we've made the entire things independent
|
||||
* of the number of meta keymaps that are available (it can change.) The
|
||||
* only thing i see left to be done is to encapsulate all this data inside
|
||||
* a class so that different contexts can have different bindings sets.
|
||||
|
@ -95,7 +95,7 @@ char *mouse_actions[] =
|
|||
* not strictly sorted. The first two bindings are special and are hardcoded,
|
||||
* and you must not change them. Entry 0 must always be "NOTHING", and
|
||||
* entry 1 must always be "SELF_INSERT". The enum that was in keys.h
|
||||
* is now totaly obsolete -- we no longer use the symbolic names, but instead
|
||||
* is now totally obsolete -- we no longer use the symbolic names, but instead
|
||||
* always use the full string name for the binding. This makes it much
|
||||
* easier to add new key bindings, as there is only one place to manage.
|
||||
*
|
||||
|
@ -120,17 +120,17 @@ char *mouse_actions[] =
|
|||
*
|
||||
* typedef MetaMap KeyTable[MAX_META];
|
||||
*
|
||||
* but then again, many of those MetaMaps are going to be totaly empty.
|
||||
* Why should we allocate 1k to something that isnt going to be used?
|
||||
* but then again, many of those MetaMaps are going to be totally empty.
|
||||
* Why should we allocate 1k to something that isn't going to be used?
|
||||
* So instead we should keep pointers to the maps and allocate them as
|
||||
* neccesary at runtime...
|
||||
* necessary at runtime...
|
||||
*
|
||||
* typedef MetaMap *KeyTable[MAX_META]; (better)
|
||||
*
|
||||
* Which is what we had before. This works out fine, except, that the
|
||||
* number of meta maps is hardcoded into the client at compile time.
|
||||
* Wouldn't it be nice to be able to determine at runtime how many maps
|
||||
* we want and be able to change them as neccesary? We can do this by
|
||||
* we want and be able to change them as necessary? We can do this by
|
||||
* having a pointer to the set of pointers of MetaMaps...
|
||||
*
|
||||
* typedef MetaMap **KeyTable; (dyanmic now)
|
||||
|
@ -329,7 +329,7 @@ void resize_metamap (int new_size)
|
|||
if (old_size < new_size)
|
||||
{
|
||||
/*
|
||||
* Realloc and copy if neccesary
|
||||
* Realloc and copy if necessary
|
||||
*/
|
||||
if (new_size > max_keys_size)
|
||||
{
|
||||
|
@ -349,7 +349,7 @@ void resize_metamap (int new_size)
|
|||
|
||||
/*
|
||||
* If we're shrinking the meta table, just garbage collect all
|
||||
* the old bindings, dont actually bother resizing the table.
|
||||
* the old bindings, don't actually bother resizing the table.
|
||||
*/
|
||||
else
|
||||
{
|
||||
|
@ -364,7 +364,7 @@ void resize_metamap (int new_size)
|
|||
* to either meaningless, or bogus data, and either cause
|
||||
* undefined behavior or a total program crash. So we walk
|
||||
* all of the remaining states and garbage collect any
|
||||
* meta transisions that are out of bounds.
|
||||
* meta transitions that are out of bounds.
|
||||
*/
|
||||
for (i = 0; i < new_size; i++)
|
||||
{
|
||||
|
@ -582,10 +582,10 @@ void save_bindings (FILE *fp, int do_all)
|
|||
}
|
||||
|
||||
/*
|
||||
* This is a function used by edit_char to retreive the details for a
|
||||
* This is a function used by edit_char to retrieve the details for a
|
||||
* specific key binding. This function provides the only external access
|
||||
* to the key bindings. The arguments are the meta state and the character
|
||||
* whose information you want to retreive. That information is stored into
|
||||
* whose information you want to retrieve. That information is stored into
|
||||
* the 'func' and 'name' pointers you pass in.
|
||||
*
|
||||
* The function will return 0 if the binding you request is a "normal" one.
|
||||
|
@ -1043,7 +1043,7 @@ static int parse_key(const char *sequence, char *term)
|
|||
return return_meta;
|
||||
|
||||
#if 0
|
||||
/* The rest of this isnt finished, hense is unsupported */
|
||||
/* The rest of this isn't finished, hence is unsupported */
|
||||
say("The bind cannot occur because the character sequence to bind contains a leading substring that is bound to something else.");
|
||||
return -1;
|
||||
#endif
|
||||
|
@ -1107,7 +1107,7 @@ BUILT_IN_COMMAND(bindcmd)
|
|||
|
||||
/*
|
||||
* Grok the key argument and see what we can make of it
|
||||
* If there is an error at this point, dont continue.
|
||||
* If there is an error at this point, don't continue.
|
||||
* Most of the work is done here.
|
||||
*/
|
||||
|
||||
|
@ -1165,7 +1165,7 @@ BUILT_IN_COMMAND(bindcmd)
|
|||
/*
|
||||
* lookup_function: When you want to convert a "binding" name (such as
|
||||
* BACKSPACE or SELF_INSERT) over to its offset in the binding lookup table,
|
||||
* you must call this function to retreive that offset. The first argument
|
||||
* you must call this function to retrieve that offset. The first argument
|
||||
* is the name you want to look up, and the second argument is where the
|
||||
* offset is to be stored.
|
||||
*
|
||||
|
@ -1229,13 +1229,13 @@ static int lookup_function(const char *orig_name, int *lf_index)
|
|||
}
|
||||
|
||||
|
||||
/* I dont know where this belongs. */
|
||||
/* I don't know where this belongs. */
|
||||
/*
|
||||
* display_key: Given a (possibly unprintable) unsigned character 'c',
|
||||
* convert that character into a printable string. For characters less
|
||||
* than 32, and the character 127, they will be converted into the "control"
|
||||
* sequence by having a prepended caret ('^'). Other characters will be
|
||||
* left alone. The return value belongs to the function -- dont mangle it.
|
||||
* left alone. The return value belongs to the function -- don't mangle it.
|
||||
*/
|
||||
static char *display_key(char c)
|
||||
{
|
||||
|
@ -1293,7 +1293,7 @@ static char keyloc[80];
|
|||
/* * * * * * * * * * * * * * * * * * INITIALIZATION * * * * * * * * * * * */
|
||||
/*
|
||||
* This is where you put all the default key bindings. This is a lot
|
||||
* simpler, just defining those you need, instead of all of them, isnt
|
||||
* simpler, just defining those you need, instead of all of them, isn't
|
||||
* it? And it takes up so much less memory, too...
|
||||
*/
|
||||
void init_keys (void)
|
||||
|
@ -1352,7 +1352,7 @@ void init_keys (void)
|
|||
snew_key(0, 127, "BACKSPACE"); /* ^? (delete) */
|
||||
|
||||
/*
|
||||
* european keyboards (and probably others) use the eigth bit
|
||||
* european keyboards (and probably others) use the eighth bit
|
||||
* for extended characters. Having these keys bound by default
|
||||
* causes them lots of grief, so unless you really want to use
|
||||
* these, they are commented out.
|
||||
|
|
|
@ -380,7 +380,7 @@ BUILT_IN_COMMAND(lastlog)
|
|||
/*
|
||||
* Which can be combined with -ALL, which
|
||||
* turns on all levels. Use --MSGS or
|
||||
* whatever to turn off ones you dont want.
|
||||
* whatever to turn off ones you don't want.
|
||||
*/
|
||||
if (!my_strnicmp(arg, "ALL", len))
|
||||
{
|
||||
|
@ -458,7 +458,7 @@ BUILT_IN_COMMAND(lastlog)
|
|||
} else
|
||||
start_pos = current_window->lastlog_head;
|
||||
|
||||
/* Let's not get confused here, display a seperator.. -lynx */
|
||||
/* Let's not get confused here, display a separator.. -lynx */
|
||||
strip_ansi_in_echo = 0;
|
||||
if (header && !fp)
|
||||
say("Lastlog:");
|
||||
|
|
|
@ -1791,7 +1791,7 @@ struct in_addr ip;
|
|||
return;
|
||||
}
|
||||
|
||||
void print_ns_succede(struct reslist *rptr)
|
||||
static void print_ns_succeed(struct reslist *rptr)
|
||||
{
|
||||
char *u, *n, *h;
|
||||
char buffer[BIG_BUFFER_SIZE];
|
||||
|
@ -1877,7 +1877,7 @@ void cdns_generic_callback(DNS_QUEUE *dns)
|
|||
if(info->func)
|
||||
info->func(info);
|
||||
else if(dns->out)
|
||||
print_ns_succede(info);
|
||||
print_ns_succeed(info);
|
||||
else
|
||||
print_ns_fail(info);
|
||||
|
||||
|
@ -2602,7 +2602,7 @@ static int ar_procanswer(struct reslist *rptr, HEADER *hptr, unsigned char *buf,
|
|||
cp += dn_skipname(cp, eob) + QFIXEDSZ;
|
||||
#endif
|
||||
/*
|
||||
* proccess each answer sent to us. blech.
|
||||
* process each answer sent to us. blech.
|
||||
*/
|
||||
while (hptr->ancount-- > 0 && cp < eob) {
|
||||
n = dn_expand(buf, eob, cp, ar_hostbuf, sizeof(ar_hostbuf)-1);
|
||||
|
@ -2746,7 +2746,7 @@ struct hostent *ar_answer(char *reip, int size, void (*func)(struct reslist *) )
|
|||
}
|
||||
ar_reinfo.re_errors++;
|
||||
/*
|
||||
** If a bad error was returned, we stop here and dont send
|
||||
** If a bad error was returned, we stop here and don't send
|
||||
** send any more (no retries granted).
|
||||
*/
|
||||
if (h_errno != TRY_AGAIN)
|
||||
|
@ -2933,7 +2933,7 @@ int s;
|
|||
ar_lookup--;
|
||||
return when;
|
||||
}
|
||||
if ((hp = ar_answer((char *)&ar_del, sizeof(ar_del), print_ns_succede)))
|
||||
if ((hp = ar_answer((char *)&ar_del, sizeof(ar_del), print_ns_succeed)))
|
||||
{
|
||||
char **s;
|
||||
ar_lookup--;
|
||||
|
@ -3040,7 +3040,7 @@ BUILT_IN_COMMAND(nslookup)
|
|||
if (host && !my_stricmp(host, "cmd"))
|
||||
{
|
||||
if (!(cmd = next_expr(&args, '{')))
|
||||
bitchsay("Need {...} for -CMD arguement");
|
||||
bitchsay("Need {...} for -CMD argument");
|
||||
else
|
||||
host = next_arg(args, &args);
|
||||
}
|
||||
|
|
|
@ -369,7 +369,7 @@ int handle_socks(int fd, struct sockaddr_in addr, char *host, int portnum)
|
|||
* we now take four arguments:
|
||||
*
|
||||
* - hostname - name of the host (pathname) to connect to (if applicable)
|
||||
* - portnum - port number to connect to or listen on (0 if you dont care)
|
||||
* - portnum - port number to connect to or listen on (0 if you don't care)
|
||||
* - service - 0 - set up a listening socket
|
||||
* 1 - set up a connecting socket
|
||||
* - protocol - 0 - use the TCP protocol
|
||||
|
|
|
@ -130,13 +130,13 @@ const char *dgets_strerror(int dgets_errno)
|
|||
*
|
||||
* Return values:
|
||||
*
|
||||
* -1 -- something really died. Either a read error occured, the
|
||||
* fildesc wasnt really ready for reading, or the input buffer
|
||||
* -1 -- something really died. Either a read error occurred, the
|
||||
* fildesc wasn't really ready for reading, or the input buffer
|
||||
* for the filedesc filled up (8192 bytes)
|
||||
* 0 -- If the data read in from the file descriptor did not form a
|
||||
* complete line, then zero is always returned. This should be
|
||||
* considered a stopping condition. Do not call dgets() again
|
||||
* after it returns 0, because unless more data is avaiable on
|
||||
* after it returns 0, because unless more data is available on
|
||||
* the fd, it will return -1, which you would misinterpret as an
|
||||
* error condition.
|
||||
* If "buffer" is 0, then whatever we have available will be
|
||||
|
@ -183,7 +183,7 @@ int BX_dgets (char *str, int des, int buffer, int buffersize, void *ssl_fd)
|
|||
}
|
||||
|
||||
/*
|
||||
* Dont try to read into a full buffer.
|
||||
* Don't try to read into a full buffer.
|
||||
*/
|
||||
if (ioe->write_pos >= ioe->buffer_size)
|
||||
{
|
||||
|
@ -193,8 +193,8 @@ int BX_dgets (char *str, int des, int buffer, int buffersize, void *ssl_fd)
|
|||
}
|
||||
/*
|
||||
* Check to see if any bytes are ready. If this fails,
|
||||
* then its almost always due to the filedesc being
|
||||
* bogus. Thats a fatal error.
|
||||
* then it's almost always due to the filedesc being
|
||||
* bogus. That's a fatal error.
|
||||
*/
|
||||
if (ioctl(des, FIONREAD, &nbytes) == -1)
|
||||
{
|
||||
|
@ -284,7 +284,7 @@ int BX_dgets (char *str, int des, int buffer, int buffersize, void *ssl_fd)
|
|||
else
|
||||
{
|
||||
/*
|
||||
* At this point nbytes is 0, and it doesnt
|
||||
* At this point nbytes is 0, and it doesn't
|
||||
* appear the socket is at EOF or ready to read.
|
||||
* Very little to do at this point but force the
|
||||
* issue and figure out what the heck went wrong.
|
||||
|
@ -305,11 +305,11 @@ int BX_dgets (char *str, int des, int buffer, int buffersize, void *ssl_fd)
|
|||
}
|
||||
case 0:
|
||||
{
|
||||
yell("des [%d] passed to dgets(), but it isnt ready.", des);
|
||||
yell("des [%d] passed to dgets(), but it isn't ready.", des);
|
||||
if (ioe->write_pos == 0)
|
||||
{
|
||||
yell("X*X*X*X*X*X*X*X*X ABANDON SHIP! X*X*X*X*X*X*X*X*X*X");
|
||||
ircpanic("write_pos is zero when it cant be.");
|
||||
ircpanic("write_pos is zero when it can't be.");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -518,11 +518,11 @@ char *t = NULL;
|
|||
|
||||
/*
|
||||
* got_initial_version_28: this is called when ircii gets the serial
|
||||
* number 004 reply. We do this becuase the 004 numeric gives us the
|
||||
* server name and version in a very easy to use fashion, and doesnt
|
||||
* number 004 reply. We do this because the 004 numeric gives us the
|
||||
* server name and version in a very easy to use fashion, and doesn't
|
||||
* rely on the syntax or construction of the 002 numeric.
|
||||
*
|
||||
* Hacked as neccesary by jfn, May 1995
|
||||
* Hacked as necessary by jfn, May 1995
|
||||
*/
|
||||
static void get_nat_address(UserhostItem *stuff, char *nick, char *args)
|
||||
{
|
||||
|
|
|
@ -165,11 +165,11 @@ void put_echo (char *str)
|
|||
* put_it: the irc display routine. Use this routine to display anything to
|
||||
* the main irc window. It handles sending text to the display or stdout as
|
||||
* needed, add stuff to the lastlog and log file, etc. Things NOT to do:
|
||||
* Dont send any text that contains \n, very unpredictable. Tabs will also
|
||||
* Don't send any text that contains \n, very unpredictable. Tabs will also
|
||||
* screw things up. The calling routing is responsible for not overwriting
|
||||
* the 1K buffer allocated.
|
||||
*
|
||||
* For Ultrix machines, you can't call put_it() with floating point arguements.
|
||||
* For Ultrix machines, you can't call put_it() with floating point arguments.
|
||||
* It just doesn't work. - phone, jan 1993.
|
||||
*/
|
||||
void BX_put_it(const char *format, ...)
|
||||
|
@ -316,7 +316,7 @@ void serversay(const char *from, const char *format, ...)
|
|||
target_window = old_target_window;
|
||||
}
|
||||
/*
|
||||
* Error is exactly like yell, except that if the error occured while
|
||||
* Error is exactly like yell, except that if the error occurred while
|
||||
* you were loading a script, it tells you where it happened.
|
||||
*/
|
||||
void error (const char *format, ...)
|
||||
|
|
|
@ -313,7 +313,7 @@ char * BX_PasteArgs(char **Args, int StartPoint)
|
|||
|
||||
/*
|
||||
* BreakArgs: breaks up the line from the server, in to where its from,
|
||||
* setting FromUserHost if it should be, and returns all the arguements
|
||||
* setting FromUserHost if it should be, and returns all the arguments
|
||||
* that are there. Re-written by phone, dec 1992.
|
||||
*/
|
||||
int BX_BreakArgs(char *Input, char **Sender, char **OutPut, int ig_sender)
|
||||
|
@ -1920,7 +1920,7 @@ void parse_server(char *orig_line)
|
|||
strncpy(copy, line, BIG_BUFFER_SIZE);
|
||||
BreakArgs(line, &from, ArgList, 0);
|
||||
|
||||
/* XXXX - i dont think 'from' can be null here. */
|
||||
/* XXXX - I don't think 'from' can be null here. */
|
||||
if (!(comm = (*ArgList++)) || !from || !*ArgList)
|
||||
return; /* Serious protocol violation -- ByeBye */
|
||||
|
||||
|
|
|
@ -582,7 +582,7 @@ HWND newsubmenu(MenuStruct *menutoadd, HWND location, int pulldown)
|
|||
NULL,
|
||||
NULL);
|
||||
|
||||
/* Go through all menuitems adding items and submenus (and subitems) as neccessary */
|
||||
/* Go through all menuitems adding items and submenus (and subitems) as necessary */
|
||||
|
||||
tmp = menutoadd->menuorigin;
|
||||
while(tmp!=NULL)
|
||||
|
@ -3038,7 +3038,7 @@ BUILT_IN_FUNCTION(fencode)
|
|||
}
|
||||
result[i] = '\0';
|
||||
|
||||
return result; /* DONT USE RETURN_STR HERE! */
|
||||
return result; /* DON'T USE RETURN_STR HERE! */
|
||||
}
|
||||
|
||||
void pm_file_dialog(char *data[7])
|
||||
|
|
|
@ -133,10 +133,12 @@ BUILT_IN_COMMAND(readlog)
|
|||
}
|
||||
|
||||
/*
|
||||
* show_help: show's either a page of text from a help_fp, or the whole
|
||||
* show_log: Shows either a page of text from a msg_fp, or the whole
|
||||
* thing, depending on the value of HELP_PAGER_VAR. If it gets to the end,
|
||||
* (in either case it will eventally), it closes the file, and returns 0
|
||||
* (in either case it will eventually), it closes the file, and returns 0
|
||||
* to indicate this.
|
||||
*
|
||||
* Based on show_help()
|
||||
*/
|
||||
static int show_log(Window *window, char *name)
|
||||
{
|
||||
|
|
12
source/reg.c
12
source/reg.c
|
@ -104,17 +104,17 @@ int new_match (const char *pattern, const char *string)
|
|||
|
||||
/*
|
||||
* If the last character in the pattern was a *, then
|
||||
* we walk the string until we find the next instance int
|
||||
* string, of the character that was after the *.
|
||||
* we walk the string until we find the next instance in
|
||||
* the string, of the character that was after the *.
|
||||
* If we get to the end of string, then obviously there
|
||||
* is no match. A * at the end of the pattern is handled
|
||||
* especially, so we dont need to consider that.
|
||||
* especially, so we don't need to consider that.
|
||||
*/
|
||||
if (asterisk)
|
||||
{
|
||||
/*
|
||||
* More pattern, no source. Obviously this
|
||||
* asterisk isnt going to cut it. Try again.
|
||||
* asterisk isn't going to cut it. Try again.
|
||||
* This replaces an 'always failure' case.
|
||||
* In 99% of the cases, we will try again and it
|
||||
* will fail anyhow, but 1% of the cases it would
|
||||
|
@ -137,12 +137,12 @@ int new_match (const char *pattern, const char *string)
|
|||
* If the character in the pattern immediately
|
||||
* following the asterisk is a qmark, then we
|
||||
* save where we're at and we allow the ? to be
|
||||
* matched. If we find it doesnt work later on,
|
||||
* matched. If we find it doesn't work later on,
|
||||
* then we will come back to here and try again.
|
||||
* OR
|
||||
* We've found the character we're looking for!
|
||||
* Save some state information about how to recover
|
||||
* if we dont match
|
||||
* if we don't match
|
||||
*/
|
||||
else if (*pattern == '?' ||
|
||||
(tolower((unsigned char)*string) == tolower((unsigned char)*pattern)))
|
||||
|
|
|
@ -351,11 +351,11 @@ char **BX_split_up_line(const char *str, int max_cols)
|
|||
*
|
||||
* It may be a good idea to allow users to control this behaviour, possibly
|
||||
* by introducing a new variable, DISPLAY_MODE. 0 is the traditional way
|
||||
* and 1 is the quick way. Anyway, we dont care at this level, as we are
|
||||
* and 1 is the quick way. Anyway, we don't care at this level, as we are
|
||||
* simply preparing the strings here.
|
||||
*
|
||||
* Errm ... oh yes, and since this caught me by surprise and caused many a
|
||||
* minutes worth of hair pulling, dont forget we need to keep count of
|
||||
* minutes worth of hair pulling, don't forget we need to keep count of
|
||||
* PRINTED Characters not buffer positions :-)
|
||||
*/
|
||||
#define SPLIT_EXTENT 40
|
||||
|
@ -408,7 +408,7 @@ char **BX_prepare_display(const char *orig_str,
|
|||
|
||||
buffer[0] = 0;
|
||||
|
||||
/* Handle blank or non-existant lines */
|
||||
/* Handle blank or non-existent lines */
|
||||
if (!orig_str || !orig_str[0])
|
||||
orig_str = space;
|
||||
|
||||
|
@ -596,7 +596,7 @@ char **BX_prepare_display(const char *orig_str,
|
|||
} /* End of switch (*ptr) */
|
||||
|
||||
/*
|
||||
* Must check for cols >= maxcols+1 becuase we can have a
|
||||
* Must check for cols >= maxcols+1 because we can have a
|
||||
* character on the extreme screen edge, and we would still
|
||||
* want to treat this exactly as 1 line, and cols has already
|
||||
* been incremented.
|
||||
|
@ -615,7 +615,7 @@ char **BX_prepare_display(const char *orig_str,
|
|||
*
|
||||
* Due to some ... interesting design considerations,
|
||||
* if you have /set indent on and your first line has
|
||||
* exactly one word seperation in it, then obviously
|
||||
* exactly one word separation in it, then obviously
|
||||
* there is a really long "word" to the right of the
|
||||
* first word. Normally, we would just break the
|
||||
* line after the first word and then plop the really
|
||||
|
@ -637,7 +637,7 @@ char **BX_prepare_display(const char *orig_str,
|
|||
/*
|
||||
* If we are approaching the number of lines that
|
||||
* we have space for, then resize the master line
|
||||
* buffer so we dont run out.
|
||||
* buffer so we don't run out.
|
||||
*/
|
||||
|
||||
if (line >= output_size - 3)
|
||||
|
@ -813,7 +813,7 @@ static int add_to_display_list(Window *window, const char *str)
|
|||
window->distance_from_display++;
|
||||
|
||||
/*
|
||||
* Only output the line if hold mode isnt activated
|
||||
* Only output the line if hold mode isn't activated
|
||||
*/
|
||||
if (((window->distance_from_display > window->display_size) &&
|
||||
window->scrollback_point) ||
|
||||
|
@ -937,8 +937,8 @@ int BX_output_line(const char *str)
|
|||
/*
|
||||
* NOTE: When we output colors, we explicitly turn off bold and reverse,
|
||||
* as they can affect the display of the colors. We turn them back on
|
||||
* afterwards, though. We dont need to worry about blinking or underline
|
||||
* as they dont affect the colors. But reverse and bold do, so we need to
|
||||
* afterwards, though. We don't need to worry about blinking or underline
|
||||
* as they don't affect the colors. But reverse and bold do, so we need to
|
||||
* make sure that the color sequence has preference, rather than the previous
|
||||
* IRC-II formatting colors.
|
||||
*
|
||||
|
@ -1116,7 +1116,7 @@ int BX_output_with_count(const char *str, int clreol, int output)
|
|||
beep++;
|
||||
break;
|
||||
}
|
||||
/* Dont ask */
|
||||
/* Don't ask */
|
||||
case '\f':
|
||||
{
|
||||
if (output)
|
||||
|
@ -1628,14 +1628,14 @@ extern Window *BX_create_additional_screen (void)
|
|||
/*
|
||||
* Make sure that no inhereted file descriptors
|
||||
* are left over past the exec. xterm will reopen
|
||||
* any fd's that it is interested in.
|
||||
* any fds that it is interested in.
|
||||
*/
|
||||
for (i = 3; i < 256; i++)
|
||||
close(i);
|
||||
|
||||
/*
|
||||
* Try to restore some sanity to the signal
|
||||
* handlers, since theyre not really appropriate here
|
||||
* handlers, since they're not really appropriate here
|
||||
*/
|
||||
my_signal(SIGINT, SIG_IGN, 0);
|
||||
my_signal(SIGSEGV, SIG_DFL, 0);
|
||||
|
@ -2040,7 +2040,7 @@ char *BX_skip_ctl_c_seq(const char *start, int *lhs, int *rhs, int proper)
|
|||
int lv1, rv1;
|
||||
|
||||
/*
|
||||
* For our sanity, just use a placeholder if the caller doesnt
|
||||
* For our sanity, just use a placeholder if the caller doesn't
|
||||
* care where the end of the ^C code is.
|
||||
*/
|
||||
if (!lhs)
|
||||
|
@ -2051,7 +2051,7 @@ char *BX_skip_ctl_c_seq(const char *start, int *lhs, int *rhs, int proper)
|
|||
*lhs = *rhs = -1;
|
||||
|
||||
/*
|
||||
* If we're passed a non ^C code, dont do anything.
|
||||
* If we're passed a non ^C code, don't do anything.
|
||||
*/
|
||||
if (*after != COLOR_CHAR)
|
||||
return (char *)after;
|
||||
|
@ -2088,7 +2088,7 @@ char *BX_skip_ctl_c_seq(const char *start, int *lhs, int *rhs, int proper)
|
|||
|
||||
|
||||
/*
|
||||
* Code certainly cant have moRe than two chars in it
|
||||
* Code certainly can't have more than two chars in it
|
||||
*/
|
||||
c1 = after[0];
|
||||
c2 = after[1];
|
||||
|
@ -2210,7 +2210,7 @@ char *BX_skip_ctl_c_seq(const char *start, int *lhs, int *rhs, int proper)
|
|||
char *BX_strip_ansi(const char *str)
|
||||
{
|
||||
/*
|
||||
* Used as a translation table when we cant display graphics characters
|
||||
* Used as a translation table when we can't display graphics characters
|
||||
* or we have been told to do translation. A no-brainer, with little attempt
|
||||
* at being smart.
|
||||
* (JKJ: perhaps we should allow a user to /set this?)
|
||||
|
@ -2354,7 +2354,7 @@ char *BX_strip_ansi(const char *str)
|
|||
int my_gcmode = gcmode;
|
||||
/*
|
||||
* This is a very paranoid check to make sure that
|
||||
* the 8-bit escape code doesnt elude us.
|
||||
* the 8-bit escape code doesn't elude us.
|
||||
*/
|
||||
if (chr == '\x9b')
|
||||
{
|
||||
|
@ -2418,8 +2418,8 @@ char *BX_strip_ansi(const char *str)
|
|||
|
||||
/*
|
||||
* gcmode 1 is "accept or reverse mangle"
|
||||
* If youre doing 8-bit, it accepts eight
|
||||
* bit characters. If youre not doing 8 bit
|
||||
* If you're doing 8-bit, it accepts eight
|
||||
* bit characters. If you're not doing 8 bit
|
||||
* then it converts the char into something
|
||||
* printable and then reverses it.
|
||||
*/
|
||||
|
@ -2497,7 +2497,7 @@ char *BX_strip_ansi(const char *str)
|
|||
/* { */ case ('o') : case ('|') : case ('}') :
|
||||
case ('~') : case ('c') :
|
||||
{
|
||||
break; /* Dont do anything */
|
||||
break; /* Don't do anything */
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2598,7 +2598,7 @@ char *BX_strip_ansi(const char *str)
|
|||
|
||||
/*
|
||||
* If we run out of code here,
|
||||
* then we're totaly confused.
|
||||
* then we're totally confused.
|
||||
* just back out with whatever
|
||||
* we have...
|
||||
*/
|
||||
|
@ -2783,8 +2783,8 @@ char *BX_strip_ansi(const char *str)
|
|||
|
||||
|
||||
/*
|
||||
* Skip over ^C codes, theyre already normalized
|
||||
* well, thats not totaly true. We do some mangling
|
||||
* Skip over ^C codes, they're already normalized
|
||||
* well, that's not totally true. We do some mangling
|
||||
* in order to make it work better
|
||||
*/
|
||||
case 3:
|
||||
|
@ -2804,7 +2804,7 @@ char *BX_strip_ansi(const char *str)
|
|||
* 131 is encountered when eight bit chars is OFF.
|
||||
* We see a character 3 (131 with the 8th bit off)
|
||||
* and so we ask skip_ctl_c_seq where the end of
|
||||
* that sequence is. But since it isnt a ^c sequence
|
||||
* that sequence is. But since it isn't a ^c sequence
|
||||
* it just shrugs its shoulders and returns the
|
||||
* pointer as-is. So we sit asking it where the end
|
||||
* is and it says "its right here". So there is a
|
||||
|
@ -2816,7 +2816,7 @@ char *BX_strip_ansi(const char *str)
|
|||
*/
|
||||
if (end == str)
|
||||
{
|
||||
/* Turn on reverse if neccesary */
|
||||
/* Turn on reverse if necessary */
|
||||
if (reverse == 0)
|
||||
output[pos++] = REV_TOG;
|
||||
output[pos++] = ' ';
|
||||
|
|
|
@ -673,7 +673,7 @@ extern int BX_find_in_server_list (char *server, int port)
|
|||
MATCH_WITH_COMPLETION(server, server_list[i].itsname);
|
||||
#endif
|
||||
/*
|
||||
* Try to avoid unneccessary string compares. Only compare
|
||||
* Try to avoid unnecessary string compares. Only compare
|
||||
* the first part of the string if there's not already a
|
||||
* possible match set in "hintfound". This enables us to
|
||||
* search for an exact match even if there's already a
|
||||
|
@ -1697,7 +1697,7 @@ BUILT_IN_COMMAND(servercmd)
|
|||
say("Need server number for -DELETE");
|
||||
}
|
||||
/*
|
||||
* Add a server, but dont connect
|
||||
* Add a server, but don't connect
|
||||
*/
|
||||
else if (strlen(server) > 1 && !my_strnicmp(server, "-SEND", strlen(server)))
|
||||
{
|
||||
|
@ -2207,7 +2207,7 @@ char *BX_get_server_nickname (int gsn_index)
|
|||
|
||||
/*
|
||||
* set_server2_8 - set the server as a 2.8 server
|
||||
* This is used if we get a 001 numeric so that we dont bite on
|
||||
* This is used if we get a 001 numeric so that we don't bite on
|
||||
* the "kludge" that ircd has for older clients
|
||||
*/
|
||||
void BX_set_server2_8 (int ss2_index, int value)
|
||||
|
@ -2430,7 +2430,7 @@ char *get_server_userhost (int gsu_index)
|
|||
}
|
||||
|
||||
/*
|
||||
* got_my_userhost -- callback function, XXXX doesnt belong here
|
||||
* got_my_userhost -- callback function, XXXX doesn't belong here
|
||||
*/
|
||||
void got_my_userhost (UserhostItem *item, char *nick, char *stuff)
|
||||
{
|
||||
|
@ -2732,7 +2732,7 @@ char *get_server_orignick(int server)
|
|||
/*
|
||||
* This is the function to attempt to make a nickname change. You
|
||||
* cannot send the NICK command directly to the server: you must call
|
||||
* this function. This function makes sure that the neccesary variables
|
||||
* this function. This function makes sure that the necessary variables
|
||||
* are set so that if the NICK command fails, a sane action can be taken.
|
||||
*
|
||||
* If ``nick'' is NULL, then this function just tells the server what
|
||||
|
@ -2820,7 +2820,7 @@ void BX_fudge_nickname(int servnum)
|
|||
|
||||
/*
|
||||
* If we got here because the user did a /NICK command, and
|
||||
* the nick they chose doesnt exist, then we just dont do anything,
|
||||
* the nick they chose doesn't exist, then we just don't do anything,
|
||||
* we just cancel the pending action and give up.
|
||||
*/
|
||||
if (s->nickname_pending)
|
||||
|
@ -3662,7 +3662,7 @@ void BX_send_msg_to_channels(int server, const char *msg)
|
|||
ChannelList *chan = NULL;
|
||||
int count;
|
||||
/*
|
||||
* Because of hybrid and it's removal of , targets
|
||||
* Because of hybrid and its removal of , targets
|
||||
* we need to detect this and get around it..
|
||||
*/
|
||||
if (get_server_version(server) == Server2_8hybrid6)
|
||||
|
@ -3697,7 +3697,7 @@ char *p = NULL;
|
|||
NickList *n = NULL;
|
||||
int count;
|
||||
/*
|
||||
* Because of hybrid and it's removal of , targets
|
||||
* Because of hybrid and its removal of , targets
|
||||
* we need to detect this and get around it..
|
||||
*/
|
||||
serv_version = get_server_version(server);
|
||||
|
|
|
@ -275,10 +275,10 @@ void *default_status_output_function = make_status;
|
|||
/*
|
||||
* convert_sub_format: This is used to convert the formats of the
|
||||
* sub-portions of the status line to a format statement specially designed
|
||||
* for that sub-portion. convert_sub_format looks for occurences of %c
|
||||
* for that sub-portion. convert_sub_format looks for occurrences of %c
|
||||
* (where c is passed to the function); when found, it is replaced by %s
|
||||
* for use in an sprintf. Only the first 'args' instances are replaced.
|
||||
* All other occurences of % are replaced by %%. The string returned by
|
||||
* All other occurrences of % are replaced by %%. The string returned by
|
||||
* this function must be freed.
|
||||
*/
|
||||
static char *convert_sub_format(const char *format, int args, char c, const char *padded)
|
||||
|
@ -378,7 +378,7 @@ static char *convert_format(Window *win, char *format, int k)
|
|||
/* Its a % */
|
||||
map = 0;
|
||||
|
||||
/* Find the map, if neccesary */
|
||||
/* Find the map, if necessary */
|
||||
if (*++format == '{')
|
||||
{
|
||||
char *endptr;
|
||||
|
@ -572,7 +572,7 @@ static void justify_status(Window *win, char *buffer, size_t buffer_size)
|
|||
}
|
||||
|
||||
/*
|
||||
* Dont allow more than CO printable characters
|
||||
* Don't allow more than CO printable characters
|
||||
*/
|
||||
if (printable >= win->screen->co)
|
||||
{
|
||||
|
@ -738,7 +738,7 @@ char *stat_convert_format(Window *win, char *form)
|
|||
/* Its a % */
|
||||
map = 0;
|
||||
|
||||
/* Find the map, if neccesary */
|
||||
/* Find the map, if necessary */
|
||||
if (*++ptr == '{')
|
||||
{
|
||||
char *endptr;
|
||||
|
|
|
@ -284,7 +284,7 @@ static int CompareKeyListField (tcl_interp, fieldName, field, valuePtr, valueSiz
|
|||
* o tcl_interp (I/O) - Error message will be return in result if there is an
|
||||
* error.
|
||||
* o fieldName (I) - The name of the field to find. Will validate that the
|
||||
* name is not empty. If the name has a sub-name (seperated by "."),
|
||||
* name is not empty. If the name has a sub-name (separated by "."),
|
||||
* search for the top level name.
|
||||
* o fieldInfoPtr (O) - The following fields are filled in:
|
||||
* o argc - The number of elements in the keyed list.
|
||||
|
@ -368,7 +368,7 @@ errorExit:
|
|||
* Returns:
|
||||
* TCL_OK - If the field was found.
|
||||
* TCL_BREAK - If the field was not found.
|
||||
* TCL_ERROR - If an error occured.
|
||||
* TCL_ERROR - If an error occurred.
|
||||
*-----------------------------------------------------------------------------
|
||||
*/
|
||||
int
|
||||
|
@ -480,7 +480,7 @@ Tcl_GetKeyedListKeys (tcl_interp, subFieldName, keyedList, keysArgcPtr,
|
|||
* o tcl_interp (I/O) - Error message will be return in result if there is an
|
||||
* error.
|
||||
* o fieldName (I) - The name of the field to extract. Will recusively
|
||||
* process sub-field names seperated by `.'.
|
||||
* process sub-field names separated by `.'.
|
||||
* o keyedList (I) - The list to search for the field.
|
||||
* o fieldValuePtr (O) - If the field is found, a pointer to a dynamicly
|
||||
* allocated string containing the value is returned here. If NULL is
|
||||
|
@ -489,7 +489,7 @@ Tcl_GetKeyedListKeys (tcl_interp, subFieldName, keyedList, keysArgcPtr,
|
|||
* Returns:
|
||||
* TCL_OK - If the field was found.
|
||||
* TCL_BREAK - If the field was not found.
|
||||
* TCL_ERROR - If an error occured.
|
||||
* TCL_ERROR - If an error occurred.
|
||||
*-----------------------------------------------------------------------------
|
||||
*/
|
||||
int Tcl_GetKeyedListField (tcl_interp, fieldName, keyedList, fieldValuePtr)
|
||||
|
@ -517,7 +517,7 @@ int Tcl_GetKeyedListField (tcl_interp, fieldName, keyedList, fieldValuePtr)
|
|||
break;
|
||||
|
||||
/*
|
||||
* Check for sub-names, temporarly delimit the top name with a '\0'.
|
||||
* Check for sub-names, temporarily delimit the top name with a '\0'.
|
||||
*/
|
||||
nameSeparPtr = strchr ((char *) fieldName, '.');
|
||||
if (nameSeparPtr != NULL)
|
||||
|
@ -600,13 +600,13 @@ exitPoint:
|
|||
* o tcl_interp (I/O) - Error message will be return in result if there is an
|
||||
* error.
|
||||
* o fieldName (I) - The name of the field to extract. Will recusively
|
||||
* process sub-field names seperated by `.'.
|
||||
* process sub-field names separated by `.'.
|
||||
* o fieldValue (I) - The value to set for the field.
|
||||
* o keyedList (I) - The keyed list to set a field value in, may be an
|
||||
* NULL or an empty list to create a new keyed list.
|
||||
* Returns:
|
||||
* A pointer to a dynamically allocated string, or NULL if an error
|
||||
* occured.
|
||||
* occurred.
|
||||
*-----------------------------------------------------------------------------
|
||||
*/
|
||||
char * Tcl_SetKeyedListField (tcl_interp, fieldName, fieldValue, keyedList)
|
||||
|
@ -629,7 +629,7 @@ char * Tcl_SetKeyedListField (tcl_interp, fieldName, fieldValue, keyedList)
|
|||
keyedList = empty_string;
|
||||
|
||||
/*
|
||||
* Check for sub-names, temporarly delimit the top name with a '\0'.
|
||||
* Check for sub-names, temporarily delimit the top name with a '\0'.
|
||||
*/
|
||||
nameSeparPtr = strchr ((char *) fieldName, '.');
|
||||
if (nameSeparPtr != NULL)
|
||||
|
@ -702,12 +702,12 @@ errorExit:
|
|||
* o tcl_interp (I/O) - Error message will be return in result if there is an
|
||||
* error.
|
||||
* o fieldName (I) - The name of the field to extract. Will recusively
|
||||
* process sub-field names seperated by `.'.
|
||||
* process sub-field names separated by `.'.
|
||||
* o fieldValue (I) - The value to set for the field.
|
||||
* o keyedList (I) - The keyed list to delete the field from.
|
||||
* Returns:
|
||||
* A pointer to a dynamically allocated string containing the new list, or
|
||||
* NULL if an error occured.
|
||||
* NULL if an error occurred.
|
||||
*-----------------------------------------------------------------------------
|
||||
*/
|
||||
char *Tcl_DeleteKeyedListField (Tcl_Interp *tcl_interp, char *fieldName, char *keyedList)
|
||||
|
@ -719,7 +719,7 @@ char *Tcl_DeleteKeyedListField (Tcl_Interp *tcl_interp, char *fieldName, char *k
|
|||
char *elemArgv [2];
|
||||
char *newElement;
|
||||
/*
|
||||
* Check for sub-names, temporarly delimit the top name with a '\0'.
|
||||
* Check for sub-names, temporarily delimit the top name with a '\0'.
|
||||
*/
|
||||
nameSeparPtr = strchr ((char *) fieldName, '.');
|
||||
if (nameSeparPtr != NULL)
|
||||
|
|
|
@ -68,7 +68,7 @@ extern int already_detached;
|
|||
|
||||
#if !defined(WTERM_C)
|
||||
|
||||
/* Systems cant seem to agree where to put these... */
|
||||
/* Systems can't seem to agree where to put these... */
|
||||
#ifdef HAVE_TERMINFO
|
||||
#define Tgetstr(x, y) ((void)&(y), tigetstr((x).iname))
|
||||
#define Tgetnum(x) tigetnum(x.iname);
|
||||
|
@ -633,7 +633,7 @@ static char termcap2[2048]; /* bigger than we need, just in case */
|
|||
|
||||
/*
|
||||
* Any GUI system modules must be included here to make the GUI support
|
||||
* routines accessable to the rest of BitchX.
|
||||
* routines accessible to the rest of BitchX.
|
||||
*/
|
||||
#ifndef WTERM_C
|
||||
#ifdef __EMXPM__
|
||||
|
@ -660,7 +660,7 @@ int term_echo (int flag)
|
|||
|
||||
/*
|
||||
* term_putchar: puts a character to the screen, and displays control
|
||||
* characters as inverse video uppercase letters. NOTE: Dont use this to
|
||||
* characters as inverse video uppercase letters. NOTE: Don't use this to
|
||||
* display termcap control sequences! It won't work!
|
||||
*
|
||||
* Um... well, it will work if DISPLAY_ANSI_VAR is set to on... (hop)
|
||||
|
@ -1054,7 +1054,7 @@ int term_init (char *term)
|
|||
* we have many ways of doing the same thing.
|
||||
* To keep the set of tests easier, we set up a bitfield integer
|
||||
* which will have the desired capabilities added to it. If after
|
||||
* all the checks we dont have the desired mask, we dont have a
|
||||
* all the checks we don't have the desired mask, we don't have a
|
||||
* capable enough terminal.
|
||||
*/
|
||||
desired = TERM_CAN_CUP | TERM_CAN_CLEAR | TERM_CAN_CLREOL |
|
||||
|
|
|
@ -39,8 +39,8 @@ static TimerList *get_timer (char *ref);
|
|||
|
||||
/*
|
||||
* timercmd: the bit that handles the TIMER command. If there are no
|
||||
* arguements, then just list the currently pending timers, if we are
|
||||
* give a -DELETE flag, attempt to delete the timer from the list. Else
|
||||
* arguments, then just list the currently pending timers; if we are
|
||||
* given a -DELETE flag, attempt to delete the timer from the list. Else
|
||||
* consider it to be a timer to add, and add it.
|
||||
*/
|
||||
BUILT_IN_COMMAND(timercmd)
|
||||
|
@ -106,7 +106,7 @@ BUILT_IN_COMMAND(timercmd)
|
|||
|
||||
if (winref == -1 && my_stricmp(na, "-1"))
|
||||
{
|
||||
say("%s: That window doesnt exist!", command);
|
||||
say("%s: That window doesn't exist!", command);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ BUILT_IN_COMMAND(timercmd)
|
|||
}
|
||||
|
||||
/*
|
||||
* This is put here on purpose -- we dont want any of the above functions
|
||||
* This is put here on purpose -- we don't want any of the above functions
|
||||
* to have any knowledge of this struct.
|
||||
*/
|
||||
static TimerList *PendingTimers;
|
||||
|
@ -291,7 +291,7 @@ static int create_timer_ref (char *refnum_want, char *refnum_gets)
|
|||
if (strlen(refnum_want) > REFNUM_MAX)
|
||||
refnum_want[REFNUM_MAX] = 0;
|
||||
|
||||
/* If the user doesnt care */
|
||||
/* If the user doesn't care */
|
||||
if (!strcmp(refnum_want, empty_string))
|
||||
{
|
||||
/* Find the lowest refnum available */
|
||||
|
@ -431,10 +431,10 @@ char *function_timer(char *n, char *args)
|
|||
* You call this to register a timer callback.
|
||||
*
|
||||
* The arguments:
|
||||
* refnum_want: The refnUm requested. This should only be sepcified
|
||||
* refnum_want: The refnum requested. This should only be specified
|
||||
* by the user, functions wanting callbacks should specify
|
||||
* the value -1 which means "dont care".
|
||||
* The rest of the arguments are dependant upon the value of "callback"
|
||||
* the value -1 which means "don't care".
|
||||
* The rest of the arguments are dependent upon the value of "callback"
|
||||
* -- if "callback" is NULL then:
|
||||
* callback: NULL
|
||||
* what: some ircII commands to run when the timer goes off
|
||||
|
|
|
@ -199,7 +199,7 @@ void set_translation(Window *win, char *tablename, int unused)
|
|||
* x) despite the 0x being defined as optionally existing on input,
|
||||
* and others zero out all the output variables if there is trailing
|
||||
* non white space in the format string which doesn't appear on the
|
||||
* input. Overall, the standard I/O libraries have a tendancy not
|
||||
* input. Overall, the standard I/O libraries have a tendency not
|
||||
* to be very standard.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1004,7 +1004,7 @@ void do_stack_set(int type, char *args)
|
|||
int cnt = 0;
|
||||
char *copy;
|
||||
copy = LOCAL_COPY(args);
|
||||
/* Dont need to unstub it, we're not actually using it. */
|
||||
/* Don't need to unstub it, we're not actually using it. */
|
||||
upper(copy);
|
||||
find_fixed_array_item(irc_variable, sizeof(IrcVariable), NUMBER_OF_VARIABLES, copy, &cnt, (int *)&var_index);
|
||||
if (cnt < 0 || cnt == 1)
|
||||
|
|
24
source/who.c
24
source/who.c
|
@ -53,7 +53,7 @@ CVS_REVISION(who_c)
|
|||
|
||||
#define WHO_INVISIBLE 0x2000
|
||||
/*
|
||||
* This is tricky -- this doesnt get the LAST one, it gets the
|
||||
* This is tricky -- this doesn't get the LAST one, it gets the
|
||||
* next to the last one. Why? Because the LAST one is the one
|
||||
* asking, and they want to know who is LAST (before them)
|
||||
* So it sucks. Sue me.
|
||||
|
@ -262,7 +262,7 @@ void BX_whobase(char *args, void (*line) (WhoEntry *, char *, char **), void (*e
|
|||
{
|
||||
if ((arg = next_arg(args, &args)) == NULL)
|
||||
{
|
||||
say("WHO -SERVER: missing arguement");
|
||||
say("WHO -SERVER: missing argument");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -274,7 +274,7 @@ void BX_whobase(char *args, void (*line) (WhoEntry *, char *, char **), void (*e
|
|||
{
|
||||
if ((arg = next_arg(args, &args)) == NULL)
|
||||
{
|
||||
say("WHO -NAME: missing arguement");
|
||||
say("WHO -NAME: missing argument");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -286,7 +286,7 @@ void BX_whobase(char *args, void (*line) (WhoEntry *, char *, char **), void (*e
|
|||
{
|
||||
if ((arg = next_arg(args, &args)) == NULL)
|
||||
{
|
||||
say("WHO -REALNAME: missing arguement");
|
||||
say("WHO -REALNAME: missing argument");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -298,7 +298,7 @@ void BX_whobase(char *args, void (*line) (WhoEntry *, char *, char **), void (*e
|
|||
{
|
||||
if ((arg = next_arg(args, &args)) == NULL)
|
||||
{
|
||||
say("WHO -NICK: missing arguement");
|
||||
say("WHO -NICK: missing argument");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -382,7 +382,7 @@ void BX_whobase(char *args, void (*line) (WhoEntry *, char *, char **), void (*e
|
|||
|
||||
void quote_whine(char *type)
|
||||
{
|
||||
yell("### Please dont do /QUOTE %s. Use /%s instead", type, type);
|
||||
yell("### Please don't do /QUOTE %s. Use /%s instead", type, type);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -443,7 +443,7 @@ do
|
|||
*/
|
||||
new_w->dirty = 1;
|
||||
/*
|
||||
* We dont always want to use this function.
|
||||
* We don't always want to use this function.
|
||||
* If another function is supposed to do the work for us,
|
||||
* we yield to them.
|
||||
*/
|
||||
|
@ -557,7 +557,7 @@ void who_end (char *from, char **ArgList)
|
|||
do
|
||||
{
|
||||
/*
|
||||
* Defer to another function, if neccesary.
|
||||
* Defer to another function, if necessary.
|
||||
*/
|
||||
if (new_w->end)
|
||||
{
|
||||
|
@ -979,7 +979,7 @@ void userhost_returned (char *from, char **ArgList)
|
|||
/*
|
||||
* Otherwise, the user just did /userhost,
|
||||
* so we offer the numeric, and if the user
|
||||
* doesnt bite, we output to the screen.
|
||||
* doesn't bite, we output to the screen.
|
||||
*/
|
||||
else if (do_hook(current_numeric, "%s %s %s %s %s",
|
||||
item.nick,
|
||||
|
@ -993,10 +993,10 @@ void userhost_returned (char *from, char **ArgList)
|
|||
}
|
||||
|
||||
/*
|
||||
* If ArgList isnt the current nick, then the current nick
|
||||
* If ArgList isn't the current nick, then the current nick
|
||||
* must not be on irc. So we whip up a dummy UserhostItem
|
||||
* and send it on its way. We DO NOT HOOK the 302 numeric
|
||||
* with this bogus entry, because thats the historical
|
||||
* with this bogus entry, because that's the historical
|
||||
* behavior. This can cause a problem if you do a USERHOST
|
||||
* and wait on the 302 numeric. I think waiting on the 302
|
||||
* numeric is stupid, anyhow.
|
||||
|
@ -1007,7 +1007,7 @@ void userhost_returned (char *from, char **ArgList)
|
|||
* Of course, only if the user asked for a callback
|
||||
* via /userhost -cmd or a direct call to userhostbase.
|
||||
* If the user just did /userhost, and the nicks arent
|
||||
* on, then we just dont display anything.
|
||||
* on, then we just don't display anything.
|
||||
*/
|
||||
if (top->func)
|
||||
{
|
||||
|
|
|
@ -2320,7 +2320,7 @@ void MoveCursor(int Xnew, int Ynew)
|
|||
}
|
||||
|
||||
void MoveRight()
|
||||
/* move cursor right, but dont update screen.
|
||||
/* move cursor right, but don't update screen.
|
||||
this procedure must be called from DispChar&DispKanji only */
|
||||
{
|
||||
CursorX++;
|
||||
|
@ -2328,7 +2328,7 @@ void MoveRight()
|
|||
}
|
||||
|
||||
void MoveLeft()
|
||||
/* move cursor right, but dont update screen.
|
||||
/* move cursor right, but don't update screen.
|
||||
this procedure must be called from DispChar&DispKanji only */
|
||||
{
|
||||
CursorX--;
|
||||
|
|
|
@ -508,8 +508,8 @@ void BX_remove_window_from_screen(Window *window)
|
|||
ircpanic("This window is not on a screen");
|
||||
|
||||
/*
|
||||
* We used to go to greath lengths to figure out how to fill
|
||||
* in the space vacated by this window. Now we dont sweat that.
|
||||
* We used to go to greath lengths to figure out how to fill
|
||||
* in the space vacated by this window. Now we don't sweat that.
|
||||
* we just blow away the window and then recalculate the entire
|
||||
* screen.
|
||||
*/
|
||||
|
@ -1071,7 +1071,7 @@ void BX_goto_window(Screen *s, int which)
|
|||
}
|
||||
|
||||
/*
|
||||
* hide_window: sets the given window to invisible and recalculates remaing
|
||||
* hide_window: sets the given window to invisible and recalculates remaining
|
||||
* windows to fill the entire screen
|
||||
*/
|
||||
void BX_hide_window(Window *window)
|
||||
|
@ -1196,8 +1196,8 @@ Window *w = NULL;
|
|||
/*
|
||||
* get_window_by_refnum: Given a reference number to a window, this returns a
|
||||
* pointer to that window if a window exists with that refnum, null is
|
||||
* returned otherwise. The "safe" way to reference a window is throught the
|
||||
* refnum, since a window might be delete behind your back and and Window
|
||||
* returned otherwise. The "safe" way to reference a window is through the
|
||||
* refnum, since a window might be deleted behind your back and and Window
|
||||
* pointers might become invalid.
|
||||
*/
|
||||
Window * BX_get_window_by_refnum(unsigned int refnum)
|
||||
|
@ -1577,7 +1577,7 @@ int BX_is_current_channel(const char *channel, int server, int delete)
|
|||
|
||||
/*
|
||||
* set_current_channel_by_refnum: This sets the current channel for the current
|
||||
* window. It returns the current channel as it's value. If channel is null,
|
||||
* window. It returns the current channel as its value. If channel is null,
|
||||
* the * current channel is not changed, but simply reported by the function
|
||||
* result. This treats as a special case setting the current channel to
|
||||
* channel "0". This frees the current_channel for the
|
||||
|
@ -2154,7 +2154,7 @@ void BX_set_display_target (const char *who, unsigned long level)
|
|||
|
||||
/*
|
||||
* We'd better check to see if this should go to a
|
||||
* specific window (i dont agree with this, though)
|
||||
* specific window (I don't agree with this, though)
|
||||
*/
|
||||
if (is_channel((char *)who_from) && from_server > -1)
|
||||
{
|
||||
|
@ -2705,7 +2705,7 @@ static Window *window_balance (Window *window, char **args, char *usage)
|
|||
|
||||
/*
|
||||
* /WINDOW BEEP_ALWAYS ON|OFF
|
||||
* Indicates that when this window is HIDDEN (sorry, thats not what it seems
|
||||
* Indicates that when this window is HIDDEN (sorry, that's not what it seems
|
||||
* like it should do, but that is what it does), beeps to this window should
|
||||
* not be suppressed like they normally are for hidden windows. The beep
|
||||
* occurs EVEN IF /set beep is OFF.
|
||||
|
@ -2770,7 +2770,7 @@ static Window *window_bind (Window *window, char **args, char *usage)
|
|||
#endif
|
||||
|
||||
/*
|
||||
* So we know this window doesnt have a current channel.
|
||||
* So we know this window doesn't have a current channel.
|
||||
* So we have to find the window where it IS the current
|
||||
* channel (if it is at all)
|
||||
*/
|
||||
|
@ -2920,7 +2920,7 @@ void win_create(int var, int test)
|
|||
* This directs the client to open up a new physical screen and create a
|
||||
* new window in it. This feature depends on the external "wserv" utility
|
||||
* and requires a multi-processing system, since it actually runs the new
|
||||
* screen in a seperate process. Please note that the external screen is
|
||||
* screen in a separate process. Please note that the external screen is
|
||||
* not actually controlled by the client, but rather by "wserv" which acts
|
||||
* as a pass-through filter on behalf of the client.
|
||||
*
|
||||
|
@ -3299,7 +3299,7 @@ static Window *window_last (Window *window, char **args, char *usage)
|
|||
* /WINDOW LASTLOG <size>
|
||||
* This changes the size of the window's lastlog buffer. The default value
|
||||
* foR a window's lastlog is the value of /set LASTLOG, but each window may
|
||||
* be independantly tweaked with this command.
|
||||
* be independently tweaked with this command.
|
||||
*/
|
||||
static Window *window_lastlog (Window *window, char **args, char *usage)
|
||||
{
|
||||
|
@ -3377,7 +3377,7 @@ static Window *window_level (Window *window, char **args, char *usage)
|
|||
|
||||
/*
|
||||
* /WINDOW LIST
|
||||
* This lists all of the windows known to the client, and a breif summary
|
||||
* This lists all of the windows known to the client, and a brief summary
|
||||
* of their current state.
|
||||
*/
|
||||
Window *window_list (Window *window, char **args, char *usage)
|
||||
|
@ -4276,7 +4276,7 @@ static window_ops options [] = {
|
|||
{ "NOTIFY", window_notify, "[on|off|toggle]\n- Turns notification on/off/toggle for the current window." },
|
||||
{ "NOTIFY_LEVEL", window_notify_level, "[level]\n- Set's current window notification level to [level]" },
|
||||
{ "NUMBER", window_number, "[number]\n- Set's the current windows refnum to #" },
|
||||
{ "POP", window_pop, "\n- Pops the top window off the window stack. if hidden it's made visible" },
|
||||
{ "POP", window_pop, "\n- Pops the top window off the window stack. If hidden it's made visible" },
|
||||
{ "PREVIOUS", window_previous, "\n- Sets the current window to the previous numbered windows" },
|
||||
{ "PROMPT", window_prompt, "[text]\n- Sets the current input prompt to [text]" },
|
||||
{ "PUSH", window_push, "[refnum]\n- Places the current window or specified window on the window stack" },
|
||||
|
@ -4424,7 +4424,7 @@ BUILT_IN_COMMAND(windowcmd)
|
|||
|
||||
/* * * * * * * * * * * SCROLLBACK BUFFER * * * * * * * * * * * * * * */
|
||||
/*
|
||||
* XXXX Dont you DARE touch this XXXX
|
||||
* XXXX Don't you DARE touch this XXXX
|
||||
*
|
||||
* Most of the time, a delete_display_line() is followed somewhat
|
||||
* immediately by a new_display_line(). So most of the time we just
|
||||
|
|
|
@ -55,13 +55,13 @@ extern char *BX_move_to_abs_word (const register char *start, char **mark, int w
|
|||
register int counter = word;
|
||||
|
||||
/* This fixes a bug that counted leading spaces as
|
||||
* a word, when theyre really not a word....
|
||||
* a word, when they're really not a word....
|
||||
* (found by Genesis K.)
|
||||
*
|
||||
* The stock client strips leading spaces on both
|
||||
* the cases $0 and $-0. I personally think this
|
||||
* is not the best choice, but im not going to stick
|
||||
* my foot in this one... im just going to go with
|
||||
* is not the best choice, but I'm not going to stick
|
||||
* my foot in this one... I'm just going to go with
|
||||
* what the stock client does...
|
||||
*/
|
||||
while (pointer && *pointer && my_isspace(*pointer))
|
||||
|
@ -92,7 +92,7 @@ extern char *BX_move_word_rel (const register char *start, char **mark, int word
|
|||
|
||||
/*
|
||||
* XXXX - this is utterly pointless at best, and
|
||||
* totaly wrong at worst.
|
||||
* totally wrong at worst.
|
||||
*/
|
||||
|
||||
if (counter > 0)
|
||||
|
@ -133,9 +133,9 @@ extern char *BX_move_word_rel (const register char *start, char **mark, int word
|
|||
* Note that because of a lot of flak, if you do an expando that is
|
||||
* a "range" of words, unless you #define STRIP_EXTRANEOUS_SPACES,
|
||||
* the "n"th word will be backed up to the first character after the
|
||||
* first space after the "n-1"th word. That apparantly is what everyone
|
||||
* wants, so thats whatll be the default. Those of us who may not like
|
||||
* that behavior or are at ambivelent can just #define it.
|
||||
* first space after the "n-1"th word. That apparently is what everyone
|
||||
* wants, so that will be the default. Those of us who may not like
|
||||
* that behavior or are at ambivalent can just #define it.
|
||||
*/
|
||||
#undef STRIP_EXTRANEOUS_SPACES
|
||||
extern char *BX_extract2(const char *start, int firstword, int lastword)
|
||||
|
@ -155,7 +155,7 @@ extern char *BX_extract2(const char *start, int firstword, int lastword)
|
|||
/*
|
||||
* Really. the only case where firstword == EOS is
|
||||
* when the user wants $~, in which case we really
|
||||
* dont need to do all the following crud. Of
|
||||
* don't need to do all the following crud. Of
|
||||
* course, if there ever comes a time that the
|
||||
* user would want to start from the EOS (when??)
|
||||
* we couldnt make this assumption.
|
||||
|
@ -251,9 +251,9 @@ extern char *BX_extract2(const char *start, int firstword, int lastword)
|
|||
}
|
||||
|
||||
/*
|
||||
* extract is a simpler version of extract2, it is used when we dont
|
||||
* extract is a simpler version of extract2, it is used when we don't
|
||||
* want special treatment of "firstword" if it is negative. This is
|
||||
* typically used by the word/list functions, which also dont care if
|
||||
* typically used by the word/list functions, which also don't care if
|
||||
* we strip out or leave in any whitespace, we just do what is the
|
||||
* fastest.
|
||||
*/
|
||||
|
@ -275,7 +275,7 @@ extern char *BX_extract(char *start, int firstword, int lastword)
|
|||
*
|
||||
* ITS OK TO TAKE OUT SPACES HERE, AS THE USER SHOULDNT EXPECT
|
||||
* THAT THE WORD FUNCTIONS WOULD RETAIN ANY SPACES. (That is
|
||||
* to say that since the word/list functions dont pay attention
|
||||
* to say that since the word/list functions don't pay attention
|
||||
* to the whitespace anyhow, noone should have any problem with
|
||||
* those ops removing bothersome whitespace when needed.)
|
||||
*/
|
||||
|
@ -310,14 +310,14 @@ extern char *BX_extract(char *start, int firstword, int lastword)
|
|||
if (lastword >= 0)
|
||||
move_to_abs_word(start, &mark2, lastword+1);
|
||||
else
|
||||
/* its negative -- thats not valid */
|
||||
/* it's negative -- that's not valid */
|
||||
return m_strdup(empty_string);
|
||||
|
||||
while (mark2 > start && my_isspace(mark2[-1]))
|
||||
mark2--;
|
||||
}
|
||||
|
||||
/* Ok.. now if we get to here, then lastword is positive, so
|
||||
/* OK.. now if we get to here, then lastword is positive, so
|
||||
* we sanity check firstword.
|
||||
*/
|
||||
if (firstword < 0)
|
||||
|
|
Loading…
Reference in New Issue