summaryrefslogtreecommitdiff
path: root/usr.bin
AgeCommit message (Collapse)Author
2007-07-30introduce a Var_Substi to substitute on intervals.Marc Espie
Since we don't really know how to change Var_Subst and dependent functions, we cheat, and copy the string to a buffer instead. Clean-up the parser a bit: reorganize the include files lookup function: introduce a resolve_include_filename function that figures out the full name of the file, introduce a handle_include_file that does all the include file handling, and rename the functions into handle_xxx_include, so that we can remove most comments. Rename ParseIsCond into handle_bsd_command, cut most of its code into constituent functions. Semantic changes: - follow the rules that, if an optional construct does not parse correctly, then it's not a real extension, and give the normal parser a chance to figure it out. If the syntax checks out, semantic errors ARE real errors. - allow variables to not be defined in include file names, no reason not to. okay miod@
2007-07-30everywhere except in Var_Parse, we always add/append variables to theMarc Espie
VAR_GLOBAL context, so make it the common case: rename the basic functions to Var_Set_with_ctxt/Var_Append_with_ctxt, define Var_Set and Var_Append as macros that specify VAR_GLOBAL, and use these. okay miod@
2007-07-30local is always true, so zap it.Marc Espie
okay miod@
2007-07-30now that it's clean enough, one can extract some common code fromMarc Espie
Var_Parse and Var_ParseSkip (the code that figures out the variable name up to eventual modifiers). okay miod@
2007-07-30clean-up. Basically:Marc Espie
- remove globals curdir and objdir, stuff them into a structure, and pass it around to the relevant functions. - cut up most of main code into functions: figure_out_MACHINE/ARCH, figure_out_CURDIR, setup_CURDIR_OBJDIR, setup_VPATH, no_fd_limits, read_makefile_list, read_all_make_rules... - simplify the code used to figure out curdir/objdir. No semantic changes. okay miod@
2007-07-30separate and name functions to add target nodes to the graph.Marc Espie
okay miod@
2007-07-30simplify the handling of assignment operators, by introducing a VAR_INVALIDMarc Espie
state and using it, leading to a simpler loop and less code. okay miod@
2007-07-29add missing over/backTodd C. Miller
2007-07-29Change FILES section to use =itemTodd C. Miller
2007-07-29Update to sudo 1.6.9p2Todd C. Miller
2007-07-29use correct length when making a copy of environTodd C. Miller
2007-07-29sync the command usage with its synopsisIgor Sobrado
ok jmc@
2007-07-29reindent, no code changeMarc Espie
2007-07-29zap redundant code; ok deanna@Constantine A. Murenin
2007-07-27size_t vs ssize_t error; spotted by zinovik@cs.karelia.ruTheo de Raadt
2007-07-27u_endscreen()'s argument is entirely unused; inspired by zinovik@cs.karelia.ruTheo de Raadt
2007-07-27replace a few more malloc(n*m) idioms with calloc(n,m) for safety;Theo de Raadt
inspired by zinovik@cs.karelia.ru
2007-07-27getpriority() and setpriority() are documented in the same page, so onlyJason McIntyre
list one of them as a reference in SEE ALSO;
2007-07-26make FILES section entries line upTodd C. Miller
2007-07-26Remove the space after "Password:" in password prompts where echo isTodd C. Miller
turned off. This is consistent with historic UNIX behavior.
2007-07-26Add the correct file descriptor to rdfd when cycling throughTodd C. Miller
the list of scripting windows. Appears to be a cut and paste error. OK deraadt@
2007-07-26Update to sudo 1.6.9p1. Note that the environment handling in sudoTodd C. Miller
1.6.9 has changed relative to older versions. Sudo now starts commands with a minimal environment containing the variables in the env_keep and env_check lists. This behavior is configurable in the sudoers file. Please see the "SECURITY NOTES" section in the sudo manual.
2007-07-25Update synopsis. with help by jmc@Claudio Jeker
2007-07-25Make it possible to show alternate routing tables in netstat. This mostlyClaudio Jeker
comes from route(8) which already had the -T option. OK henning@
2007-07-25Correctly handle the export command when writing to history file.Xavier Santolaria
2007-07-24reindent, no binary changeMarc Espie
2007-07-24same uninit variable bug as in elf_syms.cTheo de Raadt
2007-07-24reindent (no binary change)Marc Espie
2007-07-24uninit variable causing crash; veins@evilkittens.orgTheo de Raadt
2007-07-24Bring back a few things from route/show.c which I like better.Claudio Jeker
2007-07-24reformat to 8 chars tab, zap unneeded comment (no binary change)Marc Espie
2007-07-24zap unused variableMarc Espie
2007-07-24simplify computations in the var module: instead of advancing a char *Marc Espie
and keeping track of a length, we just advance the char *, and ditch the length. We can still get the length at the end of the top-level functions to satisfy existing interfaces. Much simpler code, less error-prone. Okay millert@
2007-07-24move the code that grabs a value in Var_Parse in its own function,Marc Espie
get_expanded_value. Extend the code a bit to be much more thorough in case of a recursive expansion: shows exactly the cycle of variable names involved. okay millert@
2007-07-24change Var_ParseSkip API to increment the position instead of returning aMarc Espie
length, simplifies code. (warns a bit, symptom of some further issues to fix). okay millert@
2007-07-22lexicographically sorts the list of commandsIgor Sobrado
ok jmc@
2007-07-22make sure loop variables use their own buffers.Marc Espie
(causes .for loops to give weird results very infrequently, memory handling was slightly wrong, but not enough to break things thoroughly). noticed by naddy@
2007-07-21Similar to sbin/route/show.c:Claudio Jeker
Check the rtm_version before trying to print an entry. If the rtmsg has a different version skip it and don't try to print it. Solves a SIGSEGV I have triggered with one of my scarier diffs. OK henning@
2007-07-21even though gcc doesn't reuse the utsname space, it could. Ensure MACHINEMarc Espie
stays defined.
2007-07-21zap unneeded stuffMarc Espie
2007-07-20big clean-up patch:Marc Espie
- rename a few functions in var.c to names that make more sense. - introduce Var_Deletei because it makes more sense. - rewrite .for loops to use a local LoopVar construct to avoid looking up more stuff. - reformat var.c to near K&R - rewrite most comments in var.c shown to a few people. millert@ gave me his okay since it passes through ports correctly.
2007-07-20reorder stuff in var.c so that the next patch is more readable.Marc Espie
2007-07-20- document the "play" default a little more clearlyJason McIntyre
- document the difference between "play" and "cdplay" more clearly ok mjc
2007-07-19Sync with cvs:Ray Lai
> xcalloc is unneeded here since i is always 0 and we always use the > memory after initializing it. > > Initial diff from Igor Zinovik. > > OK niallo and xsa.
2007-07-19xcalloc is unneeded here since i is always 0 and we always use theRay Lai
memory after initializing it. Initial diff from Igor Zinovik. OK niallo and xsa.
2007-07-18Support -r for the export command.Xavier Santolaria
2007-07-17Forgot this part about rlog not needing the Directory request to be sent.Xavier Santolaria
2007-07-17Correct function name in error string.Xavier Santolaria
2007-07-17Simplify the way we check wether the issued command is `log' or `rlog'.Xavier Santolaria
Input and OK ray@.
2007-07-17Do not send the Directory request when using the rlog command.Xavier Santolaria
OK joris@.