summaryrefslogtreecommitdiff
path: root/usr.bin
AgeCommit message (Collapse)Author
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@.
2007-07-17comment snicky usage of strchrMarc Espie
2007-07-16oops, missed a bit from tobias' diff - add "usage: " to usage();Jason McIntyre
from Tobias Stoeckmann
2007-07-16sync usage(); from Tobias StoeckmannJason McIntyre
2007-07-16fix percentage computation of wrapping numbers; from Willem DijkstraOtto Moerbeek
via henning@ with a twist by me
2007-07-16Do not display the `Working file:' line if the issued command is `rlog'.Xavier Santolaria
Matches GNU's behaviour. OK joris@.
2007-07-14Don't trim whitespace from stdin. Encrypt it the same as otherKenneth R Westerback
input sources. Feedback and fixes from ray@ and fgsch@. ok millert@ (six years ago) ray@ fgsch@
2007-07-12Do not fatal() if the CVSROOT/config file does not exist.Xavier Santolaria
Matches GNU's behaviour. OK ray@.
2007-07-12Delint: remove some unreachable statements, from Bret Lambert.Ray Lai
OK markus@ and dtucker@.
2007-07-09espie, you have got to be jokingTheo de Raadt
2007-07-09Fix possible heap overflow in file(1), aka CVE-2007-1536.Dimitry Andric
When writing data into a buffer in the file_printf() function, the length of the unused portion of the buffer is not correctly tracked, resulting in a buffer overflow when processing certain files. Adapted from FreeBSD's SA-07:04.file fix, with ok and some minor tweaks from canacar@ and ray@.
2007-07-09tweaks;Jason McIntyre
2007-07-09indent correctlyMarc Espie
2007-07-09repair, sorry about that (obvious typo, duh)Marc Espie
2007-07-08rename variable to errorIsOkay. What does oldVars mean anyway ?Marc Espie
2007-07-08missed part: add check to avoid poison checking inexistent local vars,Marc Espie
and do for loops for real.
2007-07-08A set of big related changes. okay millert@, tested further by kettenis@Marc Espie
and matthieu@ This all revolves around putting ALL global variables into one single big hash, and using flags. This removes some impossible to understand stuff, like old varfind, and allows for some nice stuff. - each time we reference a global variable, we create it, possibly as a dummy variable. - each time we go to the environment, we remember it, thus we no longer go back to it. Lists of dependant changes: - isolate changes to oldVars and checkEnvFirst. - remove VAR_CMD and VAR_GLOBAL contexts. The only distinction is in parsevar. Split Parse_DoVar into Parse_DoVar and Parse_CmdlineVar - rework var modules around obtain_global_var, observe flags in various functions like Var_Value and Var_Seti. - Var_Seti/Var_Appendi are almost the same code, use that internally. - add magic to handle the very special SHELL variable. - introduce Var_Definedi for the cases where we don't want the actual value, to simplify tests. - add keyword .poison, parse it and set global flags accordingly. - do poison_checks where needed. - document poison. - in for loops, set variable temporarily, so that Var_SubstVar will also substitute it in varmodifiers expressions.
2007-07-06dont inlucde <sys/syslimits.h> directly.Thordur I. Bjornsson
no binary change ok millert@
2007-07-06some discussion of devices, logs, and permissions;Jason McIntyre
help/feedback from nick, krw, miod, todd, and deraadt millert ok'd an earlier version of this diff
2007-07-05fix a "Device busy" error in server mode. found by ckuethe@Joris Vink
2007-07-05Remove unused variable; Lawrence TeoTodd C. Miller
2007-07-03Rework the way opencvs works in relation to files in the Attic/:Joris Vink
Previously, files in the 'Attic/' were linked into our filelist as being 'Attic/filename,v' this caused unneeded stress on certain functions like cvs_file_classify() who had to do pointer voodoo to split out the 'Attic/' part and do other very weird stuff to normalize the pathname of these files. Instead, we handle these files early in the start when we build the fileslist in cvs_repository_getdir(). When encountering the 'Attic/' directory, we recurse in it if required but instead of using the 'Attic/' directory component as our base directory we stick with the directory name where 'Attic/' resides in, resulting in the correct filename while maintaining the correct RCSpath for the file. This made the following things a lot easier: (and in most cases actually fixed the below points) - status with files in Attic/. - checking out HEAD repositories with files in Attic/. - checking out repositories with -rTAG. - updating with -rTAG. and as an added bonus the following now also works: - correctly creating CVS/Tag in both local and remote mode thus allowing update/status/and more to work correctly with the tagged tree. (thanks to the correct handling of -rTAG cases). - resetting tags with opencvs -A properly works too now. This is a major step forward into the usability of OpenCVS when it comes to maintaining multiple tagged trees, the next logical step would be to fix commiting to branches. enjoy you -stable cowards. tested by myself, xsa, niallo and ckuethe thanks guys!
2007-07-03On the server side, in a remote setup, do not display timestamp.Xavier Santolaria
OK joris@.
2007-07-03Rename rcs_diffreg() to diffreg().Ray Lai
OK joris@
2007-07-01Sync time buffer size; missed in previous commit.Xavier Santolaria
2007-06-30Sync revisions and time buffers size to be consistent with each others.Xavier Santolaria
Simplifies further size tweaks if needed. OK ray@.
2007-06-29*long* options are undocumented; ok rayJason McIntyre
2007-06-29Server-side bits for release command.Xavier Santolaria
2007-06-29Sync cvs/rcs diff code.Ray Lai
OK joris and xsa.
2007-06-28Sync revisions and time buffers size to be consistent with each others.Xavier Santolaria
Simplifies further size tweaks if needed. OK niallo@ ray@.
2007-06-28When commiting to a server in a remote setup classifyJoris Vink
the files based upon their entry in CVS/Entries instead of using the local classifying code and trying to locate the RCSfile on our local disks, which ofc does not work correctly. OK niallo@
2007-06-28Bring the index defines back in sync with struct nlist after removal of IPXClaudio Jeker
symbols from the table. This fixes the netstat issues some people reported. OK henning@