aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install/lib/str.c
Commit message (Collapse)AuthorAgeFilesLines
* Backout libinstall.a -> libpkg commit.Florent Thoumie2011-05-171-0/+129
| | | | | | | Discussed with: erwin, brooks, bapt Notes: svn path=/head/; revision=222035
* - Take libinstall.a out of pkg_install and make it a proper shared library.Florent Thoumie2010-04-231-129/+0
| | | | | | | | | | | | | | - Rework the wrapper support to check libpkg version as well as pkg_install version. - Add libfetch to _prebuild_libs. - There are no new features introduced. Notes: the API is not stable, so basically, do not use libpkg in your projects for now. Also there's no manpage for libpkg yet, because the API will change drastically. I repeat, do not use libpkg for now. Notes: svn path=/head/; revision=207113
* pkg_create incorrectly does not add trailing '\n' when it receivesMario Sergio Fujikawa Ferreira2003-05-261-1/+22
| | | | | | | | | | | | | | | | | | | | | | either COMMENT or DESCR from the command line. When a port is installed, one gets both +COMMENT and +DESCR files with a trailing '\n' character. However, +COMMENT does not contain a trailing '\n' when it is installed from a package due to this behavior of pkg_create. Therefore, make sure it behaves exactly the same regardless of where got its information; either command line or files. The modified functions are used by pkg_create. PR: 52097 Reviewed by: bento, kris, portmgr, re, Michael Nottebrock <michaelnottebrock@gmx.net>, Martin Horcicka <horcicka@FreeBSD.cz> Approved by: re (scottl) MFC after: 1 week Notes: svn path=/head/; revision=115325
* Fix SCM ID's.David E. O'Brien2002-04-011-5/+3
| | | | Notes: svn path=/head/; revision=93520
* WARNS=2 cleanup.Maxim Sobolev2001-10-101-3/+3
| | | | | | | | Tested on: i386, alpha MFC after: 2 weeks Notes: svn path=/head/; revision=84745
* Reduce private "lesser known" function redirection to improve clarity.David E. O'Brien2001-08-131-36/+2
| | | | | | | Approved by: jkh Notes: svn path=/head/; revision=81571
* The security officer requested this be backed out for discussion.David E. O'Brien2001-07-281-0/+14
| | | | Notes: svn path=/head/; revision=80472
* Remove s_strl*(). I am not sure what was thought they accomplished.David E. O'Brien2001-07-281-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reading the code I had to stop, say "ok, what does *these* modifications of strl*() do? Pull out grep. Oh, not in add/, maybe above in ../lib/? Yep. So what do they do? Comments above them are misleading, guess I'll have to read the code. Oh, they just test strl* against the size and return the result of the test. Now I can continue to read the code I was. The uses of s_strl*() then test that result and errx()'s. Lets think about the "optimized" code I am removing: In general the compiler pushes the three args to strl* onto the stack and calls s_strl*. s_strl* has to indirectly access 3 args from the stack. Then push them on the stack a 2nd time for the real strl* call. s_strl* then pops the return from strl* off the stack; or moves it from the register it was returned in, to the register where tests can happen. s_strl* then pops the three arguments to strl*. Perform the test, push the result of the test, or move it from the result register to the return value register. The caller to s_strl* now has to either pop the return value of s_strl* or move it from the return value register to the test register. The caller then pops the three args to s_strl* off the stack (the same args that s_strl* itself had to pop off after the real call to strl*). The s_strl* caller then performs a simular test to what has already been done, and conditionally jumps. By doing things this way, we've given the compiler optimizer less to work with. Also, please don't forget the that call to s_strl* has possibly jumped to code not in the cache due to being far away from the calling code, thus causing a pipeline stall. So where is the "optimization" from s_strl*? It isn't code clarity. It isn't code execution speed. It isn't code size either. Notes: svn path=/head/; revision=80463
* Clean up some of the evil string handling in this code, replaceKris Kennaway2001-05-121-0/+14
| | | | | | | | | | | warnx()+exit() with errx() and replace a big if..then..else construct to determine the package download directory with a lookup table. Reviewed by: jkh MFC after: 2 weeks Notes: svn path=/head/; revision=76504
* - Add which(1)-like functionality into pkg_info;Maxim Sobolev2001-03-231-0/+19
| | | | | | | | | | | | - fix a harmless bug in match_installed() function introduced in my last commit; - uniformely reorder includes across files. Submitted by: Garrett Rooney <rooneg@electricjellyfish.net> Not objected by: jkh, -ports Notes: svn path=/head/; revision=74699
* Cause fatal error messages to be a little more helpful to the programmerJordan K. Hubbard2000-10-221-2/+2
| | | | | | | | | | | | concerning where they're taking place. Switch from [r]index() to str[r]chr() functions, which are more ISO compliant. Prompted by: Edward Welbourne <eddy@vortigen.demon.co.uk> Notes: svn path=/head/; revision=67429
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50479
* Use err(3). Cosmetics in usage string and man page.Philippe Charnier1997-10-081-1/+2
| | | | Notes: svn path=/head/; revision=30221
* Bring forward my changes from 2.1Jordan K. Hubbard1995-10-251-0/+12
| | | | Notes: svn path=/head/; revision=11780
* Add code for dealing with URLs.Jordan K. Hubbard1995-04-261-1/+1
| | | | Notes: svn path=/head/; revision=8087
* Add a new basename_of() function.Jordan K. Hubbard1994-11-171-0/+13
| | | | Notes: svn path=/head/; revision=4546
* The release version of my package install suite. Please see man pagesJordan K. Hubbard1993-08-261-0/+85
for info. Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=327