summaryrefslogtreecommitdiff
path: root/usr.bin
AgeCommit message (Collapse)Author
2006-04-18For prototype argument conversions, include both "from" and "to" types.Chad Loder
2006-04-18For all warnings involving prototypes, print the function name and theChad Loder
argument number.
2006-04-18Combine code to prompt user for input into a shared function,Ray Lai
reducing some complex fats from ci.c. OK joris@
2006-04-18Add a funcname() function, which returns the name of a function given aChad Loder
CALL or AMPER or NAME node to a function or pointer to a function. This will come in handy later.
2006-04-18The old way of passing function argument information was to pass an intChad Loder
which corresponded to the argument # (1-based, with 0 meaning it is not an argument). This sucked because it is impossible to include the function name or argument name in warnings when all you have is an argument number. Introduce a new type farg_t which represents a passed function argument. struct farg contains argument number, function name, and argument symbol information from the prototype).
2006-04-18/* FALLTHROUGH */ to share code between the -N and -n flags.Ray Lai
OK joris@
2006-04-18Removes memory leaks when flags are called multiple times. ThisRay Lai
is the easy way out. The code should be able to handle having pb.author, pb.description, and pb.symbol as const char * strings pointing to rcs_optarg values without using xstrdup at all. The code is a bit hairy so it's difficult to verify that it's done correctly, so that'll be a plan for another day. In the meantime, this works. OK joris@
2006-04-18Remove -h flag from rcs_getopt loop, which is not in GNU.Ray Lai
OK xsa@
2006-04-17Pass -CC to cpp, which preserves comments in macros. This gets us __deadChad Loder
code detection and later on, other things.
2006-04-17plug memory leak; OK ray@.Xavier Santolaria
2006-04-17Relieve checkin_update and checkin_init of the responsibility ofRay Lai
calling rcs_close() so we don't try to rcs_close() the same file twice if the working file does not exist, resulting in a core dump. The current code also returns the status of the last file, so if we do: $ touch file $ ci nonexistent file that will return 0. GNU returns 1. Fix that. Additionally, it returns -1 on error, which turns into 255. It should return 1. OK niallo@
2006-04-17Three undocumented options got lost in the conversion to getopt(3).Moritz Jodeit
Remove their remaining code, since they were not working before. Initial diff from Steffen Wendzel. ok millert@
2006-04-17Remove useless "h" and "?" from getopt(3) string.Moritz Jodeit
From Steffen Wendzel. ok marius@
2006-04-17Remove unused variable.Ray Lai
Found by lint. OK joris@
2006-04-17Remove pointless stat() call.Ray Lai
OK joris@
2006-04-16- fix description handling.Niall O'Higgins
ok joris@ xsa@
2006-04-16reorder sanity test so that it cannot dereference past the end of theDamien Miller
iov array; well spotted canacar@!
2006-04-16Handle / inside []s properly.Hugh Graham
OK by otto and millert. Offered back to bell-labs.
2006-04-16avoid making a tiny 4-byte write to send the packet length of sftpDamien Miller
commands, which would result in a separate tiny packet on the wire by using atomiciov(writev, ...) to write the length and the command in one pass; ok deraadt@
2006-04-16introduce atomiciov() function that wraps readv/writev to retryDamien Miller
interrupted transfers like atomicio() does for read/write; feedback deraadt@ dtucker@ stevesk@ ok deraadt@
2006-04-16Fix condition where we could exit with a fatal error when an inputDamien Miller
buffer became too large and the remote end had advertised a big window. The problem was a mismatch in the backoff math between the channels code and the buffer code, so make a buffer_check_alloc() function that the channels code can use to propsectivly check whether an incremental allocation will succeed. bz #1131, debugged with the assistance of cove AT wildpackets.com; ok dtucker@ deraadt@
2006-04-15dont stupidly duplicate code. make rlog use rcs_rev_select() and thusXavier Santolaria
nuke rlog_rev_select(). OK niallo@.
2006-04-15Fix indentation for "Ostersonntag".Bernd Ahlers
"looks gut" mickey@
2006-04-15Plug some memory leaks; ok niallo@Patrick Latifi
2006-04-14spacesTheo de Raadt
2006-04-14- don't append the extension if it's already there (PR 5076).Joris Vink
- show magic branches in rlog (thanks for that nicer hack niall). - correct output in rcsdiff, so we perfectly match gnu's all these bugs were found by sturm@ while he was using cvsweb (which uses the RCS tools). "it is in my view that you should put it in" niallo@
2006-04-14- swap a hack for a slightly nicer hack using a global variable. this avoidsNiall O'Higgins
adding a really nasty hack to make some upcoming rlog fixes from joris work. ok joris@
2006-04-14Add missing usage() calls.Ray Lai
``crazy'' joris@
2006-04-14Plug obvious memory leaks.Ray Lai
The comparison function was previously changed by me to use strcmp, which is probably wrong since a buffer can theoretically have NULs in it. This fixes it. (In my defense, the original code converted the buffer text to char * values and compared until there was either a difference or until a NUL was reached, so my previous change was no worse.) OK joris@
2006-04-14Remove global variable RCSFILE.Ray Lai
OK joris@
2006-04-14Remove extraneous argument from rlog_file().Ray Lai
OK joris@
2006-04-14Short-circuit rlog when the -l flag is specified but there are no locks.Ray Lai
OK joris@
2006-04-14spacingTheo de Raadt
2006-04-14more nasty spaces go bye byeTheo de Raadt
2006-04-14remove a metric buttload of excessive ()Theo de Raadt
no binary change; ok ray
2006-04-14update the manpage to document interrupt cpu time in the vmstat view.David Gwynne
prodded by deraadt@
2006-04-14remove comments that says we dont count intr time and remove some code thatDavid Gwynne
fudges the output to stay clean when intr time wasnt shown. not needed since we show it now.
2006-04-14excessive addition to brackets is a mental disease. you will goTheo de Raadt
blind, too. seek help. no binary change, ok joris
2006-04-14show cpu time spent in interrupts. ive been wanting this for years.David Gwynne
tweaks by deraadt@ ok by many
2006-04-14Fix a typo introduced in rev 1.135; ok ray@Patrick Latifi
2006-04-13Change rcs_parse_init() to return void, since it always returned 0.Ray Lai
Remove unused variables found by lint. Some parts OK xsa@, ``throw it in :)'' joris@
2006-04-13add support for the openrcs -o'range' option.Joris Vink
-o allows users to delete revisions in the specified RCS files. example: rcs -o1.4:1.6 foo deletes revisions 1.4 - 1.6 rcs -o1.3 foo deletes revision 1.3 joint work with niallo@ okay niallo@
2006-04-13fix -z option for openrcs, this was broken by xsaJoris Vink
when he yanked the code out of rcs.c and placed it in rcstime.c. struct tm ltb, *tb; tb = &ltb; return (tb); isn't really the most perfect idiom to return a value to the caller, now is it? as a bonus -z for rlog now works too. okay niallo@
2006-04-13fix the obviously broken cvs_buf_set(), so we don't end upJoris Vink
getting our buffer reset to 0 (empty) all the time. i noticed this when i was trying to fix -z for keyword expansion. sigh. okay niallo@
2006-04-13Add error checking for vasprintf. Stylistic suggestions from xsa@.Ray Lai
OK xsa@
2006-04-13Remove unused variable.Ray Lai
Found by lint. OK xsa@
2006-04-13Currently rcs_getopt spits out a generic error message if you doRay Lai
`ci -m file'. This changes it so if -m is given without an argument a customized error message is printed. While I was there I sorted the optstring according to style(9). ``Oh, I see it now.'' niallo@
2006-04-13clean up temporary files when we finish running.Joris Vink
"cool" niallo@
2006-04-13fix some typosNiall O'Higgins
2006-04-13correctly handle RCS files without any revisions;Joris Vink
original diff from ray@, crafted into shape by myself. okay ray@