chip@ateng.ateng.com (Chip Salzenberg) (01/23/90)
Many compilers cannot handle very long strings. These patches reduce the
length of help strings by breaking them up into several strings.
Index: builtins.h
***************
*** 35,39 ****
int enabled;
char *short_doc;
! char *long_doc;
};
--- 35,39 ----
int enabled;
char *short_doc;
! char *long_doc[8];
};
Index: builtins.c
***************
*** 273,277 ****
the function is executed)\n\
-k All keyword arguments are placed in the environment for a\n\
! comand, not just those that precede the command name\n\
-n Read commands but do not execute them\n\
-t Exit after reading and executing one command\n\
--- 273,277 ----
the function is executed)\n\
-k All keyword arguments are placed in the environment for a\n\
! comand, not just those that precede the command name\n", "\
-n Read commands but do not execute them\n\
-t Exit after reading and executing one command\n\
***************
*** 279,283 ****
-v Print shell input lines as they are read\n\
-x Print commands and their arguments as they are executed\n\
! -l Save and restore the binding of the NAME in a FOR command.\n\
-d Disable the hashing of commands that are looked up for execution.\n\
Normally, commands are remembered in a hash table, and once\n\
--- 279,283 ----
-v Print shell input lines as they are read\n\
-x Print commands and their arguments as they are executed\n\
! -l Save and restore the binding of the NAME in a FOR command.\n", "\
-d Disable the hashing of commands that are looked up for execution.\n\
Normally, commands are remembered in a hash table, and once\n\
***************
*** 284,288 ****
found, do not have to be looked up again\n\
-o Enable ! style history substitution. This flag is on by\n\
! by default.\n\
\n\
Using + rather than - causes these flags to be turned off. The\n\
--- 284,288 ----
found, do not have to be looked up again\n\
-o Enable ! style history substitution. This flag is on by\n\
! by default.\n", "\
\n\
Using + rather than - causes these flags to be turned off. The\n\
***************
*** 290,294 ****
set of flags may be found in $-. The remaining ARGs are positional\n\
parameters and are assigned, in order, to $1, $2, ... $9. If no\n\
! ARGs are given, all shell variables are printed" },
{ "shift", shift_builtin, 1, "shift [n]",
--- 290,295 ----
set of flags may be found in $-. The remaining ARGs are positional\n\
parameters and are assigned, in order, to $1, $2, ... $9. If no\n\
! ARGs are given, all shell variables are printed"
! },
{ "shift", shift_builtin, 1, "shift [n]",
***************
*** 316,320 ****
\n\
File operators:\n\
! \n\
-b FILE True if file is block special.\n\
-c FILE True if file is character special.\n\
--- 317,321 ----
\n\
File operators:\n\
! \n", "\
-b FILE True if file is block special.\n\
-c FILE True if file is character special.\n\
***************
*** 324,328 ****
-g FILE True if file is set-group-id.\n\
-L FILE True if file is a symbolic link.\n\
! -k FILE True if file has its \"sticky\" bit set.\n\
-p FILE True if file is a named pipe.\n\
-r FILE True if file is readable by you.\n\
--- 325,329 ----
-g FILE True if file is set-group-id.\n\
-L FILE True if file is a symbolic link.\n\
! -k FILE True if file has its \"sticky\" bit set.\n", "\
-p FILE True if file is a named pipe.\n\
-r FILE True if file is readable by you.\n\
***************
*** 329,333 ****
-s FILE True if file is not empty.\n\
-S FILE True if file is a socket.\n\
! -t [FD] True if FD is opened on a terminal. If FD\n\
is omitted, it defaults to 1 (stdout).\n\
-u FILE True if the file is set-user-id.\n\
--- 330,334 ----
-s FILE True if file is not empty.\n\
-S FILE True if file is a socket.\n\
! -t [FD] True if FD is opened on a terminal. If FD\n", "\
is omitted, it defaults to 1 (stdout).\n\
-u FILE True if the file is set-user-id.\n\
***************
*** 335,339 ****
-x FILE True if the file is executable by you.\n\
-O FILE True if the file is effectively owned by you.\n\
! \n\
FILE1 -nt FILE2 True if file1 is newer than (according to\n\
modification date) file2.\n\
--- 336,340 ----
-x FILE True if the file is executable by you.\n\
-O FILE True if the file is effectively owned by you.\n\
! \n", "\
FILE1 -nt FILE2 True if file1 is newer than (according to\n\
modification date) file2.\n\
***************
*** 351,355 ****
STRING1 != STRING2\n\
True if the strings are not equal.\n\
! \n\
Other operators:\n\
\n\
--- 352,356 ----
STRING1 != STRING2\n\
True if the strings are not equal.\n\
! \n", "\
Other operators:\n\
\n\
***************
*** 374,378 ****
signal is ignored by the shell and by the commands it invokes. If\n\
SIGNAL_SPEC is ON_EXIT (0) the command ARG is executed on exit from\n\
! the shell. The trap command with no arguments prints the list of\n\
commands associated with each signal number. SIGNAL_SPEC is either\n\
a signal name in <signal.h>, or a signal number. The syntax `trap -l'\n\
--- 375,379 ----
signal is ignored by the shell and by the commands it invokes. If\n\
SIGNAL_SPEC is ON_EXIT (0) the command ARG is executed on exit from\n\
! the shell. The trap command with no arguments prints the list of\n", "\
commands associated with each signal number. SIGNAL_SPEC is either\n\
a signal name in <signal.h>, or a signal number. The syntax `trap -l'\n\
***************
*** 388,392 ****
alias, shell function, shell builtin, disk file, or unfound,\n\
respectively.\n\
! \n\
If the -path flag is used, either returns the name of the disk file\n\
that would be exec'ed, or nothing if -type wouldn't return `file'\n\
--- 389,393 ----
alias, shell function, shell builtin, disk file, or unfound,\n\
respectively.\n\
! \n", "\
If the -path flag is used, either returns the name of the disk file\n\
that would be exec'ed, or nothing if -type wouldn't return `file'\n\
***************
*** 403,407 ****
started by the shell, on systems that allow such control. If an\n\
option is given, it is interpreted as follows:\n\
! \n\
-c the maximum size of core files created\n\
-d the maximum size of a process's data segment\n\
--- 404,408 ----
started by the shell, on systems that allow such control. If an\n\
option is given, it is interpreted as follows:\n\
! \n", "\
-c the maximum size of core files created\n\
-d the maximum size of a process's data segment\n\
***************
*** 410,414 ****
-t the maximum amount of cpu time in seconds\n\
-f the maximum size of files created by the shell\n\
! \n\
If LIMIT is given, it is the new value of the specified resource.\n\
Otherwise, the current value of the specified resource is printed.\n\
--- 411,415 ----
-t the maximum amount of cpu time in seconds\n\
-f the maximum size of files created by the shell\n\
! \n", "\
If LIMIT is given, it is the new value of the specified resource.\n\
Otherwise, the current value of the specified resource is printed.\n\
***************
*** 590,596 ****
strnicmp (pattern, shell_builtins[i].name, plen) == 0)
{
! printf ("%s: %s\n%s.\n",
! shell_builtins[i].name, shell_builtins[i].short_doc,
! shell_builtins[i].long_doc);
match_found++;
}
--- 591,600 ----
strnicmp (pattern, shell_builtins[i].name, plen) == 0)
{
! register char **d;
! printf ("%s: %s\n",
! shell_builtins[i].name, shell_builtins[i].short_doc);
! for (d = shell_builtins[i].long_doc; *d; ++d)
! printf ("%s", *d);
! printf (".\n");
match_found++;
}