Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
History for libpkg/pkg_printf.c  ·  View all commits
156 commits
S
Merge remote-tracking branch 'upstream/main'
Shawn Webb
6 days ago 920c183
J
Fix typos in source code
Jose Luis Duran
7 days ago 10f92f1
B
(r)query: if %{ is encountered fallback on using directly pkg_printf(3)
Baptiste Daroussin
19 days ago 5a0342c
B
options: now that options are simple name/value tuples make them kvlist_t
Baptiste Daroussin
22 days ago a25ae64
B
options: remove %Od and %OD they where never used and populated
Baptiste Daroussin
22 days ago 903337f
S
Merge remote-tracking branch 'upstream/main'
Shawn Webb
22 days ago abccdd3
B
query: fix multiline SIGBUS on case like %dn with no deps
Baptiste Daroussin
1 month ago a8a53cf
B
memory: drastically reduce memory usage
Baptiste Daroussin
3 months ago 83243c7
S
Merge commit '2d18505bf79a2eb87e2e72bbc3e30b0cf7f6b15c'
Shawn Webb
4 months ago eacbab2
s
pkgdb: track mtime in pkgdb
strssndktn
7 months ago 08bf9b3
s
pkgdb: track uname, gname, permissions and fflags in pkgdb
strssndktn
7 months ago 699f92e
S
Merge remote-tracking branch 'upstream/main'
Shawn Webb
11 months ago ba89bd1
B
vec: convert pkg-message to vector
Baptiste Daroussin
1 year ago c01f2b7
B
vec: convert kvlist into vectors
Baptiste Daroussin
1 year ago 28aa748
B
pkg: convert stringlist_t to charv_t
Baptiste Daroussin
1 year ago 3c90262
S
Merge remote-tracking branch 'freebsd/main'
Shawn Webb
1 year ago 84c2214
B
altabi: rename the private field arch into altabi
Baptiste Daroussin
1 year ago 72cc0cd
S
Merge branch 'upstream-master'
Shawn Webb
3 years ago 6c2ebb5
B
messages: convert to tllist
Baptiste Daroussin
3 years ago 0b8ce04
B
API: convert all abused hash table into stringlist
Baptiste Daroussin
4 years ago 9b49b83
B
libpkg: convert annotation to kvlist
Baptiste Daroussin
4 years ago a37bc66
B
libpkg: Convert licenses and categories to stringlist
Baptiste Daroussin
4 years ago b5eefda
B
pkghash: use iterator every where possible
Baptiste Daroussin
4 years ago 284d5ef
B
convert from khash to pkghash
Baptiste Daroussin
4 years ago 438bcc6
S
Merge commit '74fd3389a4ee2611603ee8658d2f3b4182ace73e'
Shawn Webb
5 years ago b759c48
B
Avoid making making xstring.h public
Baptiste Daroussin
5 years ago 74fd338
B
pkg_printf: migrate to open_memstream
Baptiste Daroussin
5 years ago a61a302
S
Merge remote-tracking branch 'upstream/master' into master
Shawn Webb
5 years ago 7e2225c
E
pkg query: Include the files and sum in '%X'
Emmanuel Vadot
5 years ago c337c10
E
pkg query: Fix '%X' to not use the version
Emmanuel Vadot
5 years ago ed15479
S
Merge remote-tracking branch 'upstream/master'
Shawn Webb
5 years ago d871ad5
E
query: Add %X to get the internal checksum of the package
Emmanuel Vadot
5 years ago 366e2df
B
Improve portability
Baptiste Daroussin
7 years ago 8b232dd
B
Add %Q to print altabi
Baptiste Daroussin
8 years ago ed56055
V
Merge branch 'master' of github.com:freebsd/pkg
Vsevolod Stakhov
9 years ago d7f6ae8
B
Present the proper abi for %q
Baptiste Daroussin
9 years ago 8d641b4
B
Abort if asprintf fails
Baptiste Daroussin
9 years ago 721c1e2
B
abort() in case of memory failure
Baptiste Daroussin
9 years ago 2a1ca66
B
Fix warnings reported by clang
Baptiste Daroussin
9 years ago 1d317c3
B
Replace libsbuf with utstring.h to improve portability
Baptiste Daroussin
9 years ago f93c045
B
Remove more freebsdism
Baptiste Daroussin
9 years ago 9fd372f
B
Prevent a potential out of bounds read if one days some files are larger than Exabyte
Baptiste Daroussin
10 years ago ce582b6
B
Fix performance regression on files/directories
Baptiste Daroussin
10 years ago 45c1211
B
Make pkg info -D show correctly messages with new format
Baptiste Daroussin
10 years ago 58fd84e
M
Ignore the zero padding format modifier with sting values
Matthew Seaman
10 years ago 1e310be
V
Merge branch 'message-rework'
Vsevolod Stakhov
10 years ago 631ae91
V
More rework for new pkg-message.
Vsevolod Stakhov
10 years ago 0bcc13c
B
Get rid of pkg_strel
Baptiste Daroussin
10 years ago ed5762b
B
Convert pkg_users pkg_groups to strings hash map
Baptiste Daroussin
10 years ago 2d6c6e0
B
Remove never used uidstr/gidstr
Baptiste Daroussin
10 years ago d7d8ada
B
Convert *provides/*requires to khash
Baptiste Daroussin
10 years ago f4dcde2
B
Fix missing ';'
Baptiste Daroussin
11 years ago dc98f9b
B
Add %Y and %Y in pkg_printf to show provides/requires
Baptiste Daroussin
11 years ago 7dbe817
M
Add new %x code for pkgsize (size of package tarball)
Matthew Seaman
11 years ago f3ae28c
M
Merge branch 'master' of github.com:freebsd/pkg
Matthew Seaman
11 years ago a5266e8
V
Merge branch 'linux-build'
Vsevolod Stakhov
11 years ago dd76225
V
Build libpkg under linux.
Vsevolod Stakhov
11 years ago 5c407dd
B
Direct check of pkg->locked
Baptiste Daroussin
11 years ago 56022a2
B
Remove useless sbuf Remove useless accessor
Baptiste Daroussin
11 years ago 363b22e
B
Remove useless use of sbuf Remove useless accessor
Baptiste Daroussin
11 years ago 093841f
B
Do not use sbuf in pkg_dep and avoid accessors in library
Baptiste Daroussin
11 years ago e9eced8
B
Last minutes fixes
Baptiste Daroussin
11 years ago 05f30e3
B
Finish converting struct pkg into a proper structure
Baptiste Daroussin
11 years ago eab4f94
B
Make struct pkg a proper structure
Baptiste Daroussin
11 years ago 99c2768
B
pkg_group and pkg_user are internal only
Baptiste Daroussin
11 years ago f5726e0
B
pkg_dir is internal only, no need for accessors
Baptiste Daroussin
11 years ago 5066570
B
pkg_file is only used internally no need for accessors for other cases pkg_printf is enough
Baptiste Daroussin
11 years ago 7e21f29
B
Garbage collect now no-op code
Baptiste Daroussin
11 years ago f0b1fae
B
Add a private function to retrive annotations
Baptiste Daroussin
11 years ago d8b3bb5
V
Merge pull request #855 from dag-erling/query-R
Vsevolod Stakhov
11 years ago 9014833
D
In format_repo_ident(), look for the "repository" annotation if PKG_REPONAME is undefined. Use this to implement the %R query pattern.
Dag-Erling Smørgrav
11 years ago bbb4f6f
V
Merge branch 'gsoc2014'
Vsevolod Stakhov
11 years ago 17804c4
V
No more repo ident/name.
Vsevolod Stakhov
11 years ago 6cbd570
V
Do not fail on empty checksum.
Vsevolod Stakhov
11 years ago 2cf3320
V
Merge branch 'pkg-set-bool'
Vsevolod Stakhov
12 years ago d21139d
V
Fix PKG_LICENSE_LOGIC and pkg_get.
Vsevolod Stakhov
12 years ago 4c7b46e
B
Merge categories, licenses, annotations into pkg->fields
Baptiste Daroussin
12 years ago 4feccaf
B
Convert struct pkg to mostly be a ucl_object_t and chase libucl changes
Baptiste Daroussin
12 years ago 3a72e6b
M
Merge branch 'master' into indexfile
Matthew Seaman
12 years ago 669b695
B
turn struct pkg_license into a pkg_object
Baptiste Daroussin
12 years ago 2addf97
V
Use short checksum for files in cache.
Vsevolod Stakhov
12 years ago e624257
B
Turn struct pkg_categories into a pkg_object
Baptiste Daroussin
12 years ago a9a44e7
M
Merge branch 'master' into indexfile
Matthew Seaman
12 years ago 859bbf1
B
Fix warning
Baptiste Daroussin
12 years ago 4f3f871
B
Convert pkg_note and annotations into a pkg_object
Baptiste Daroussin
12 years ago 6f18a14
J
libpkg: Fix the use of %{....%} modifiers with '%t' timestamp option
Jamie Landeg Jones
12 years ago e78b19e
V
Merge branch 'master' into gsoc
Vsevolod Stakhov
12 years ago 8d30157
M
Add new %Od and %OD pkg_printf() format codes for option default value and option description, respectively.
Matthew Seaman
12 years ago efbb19d
B
Fix potential NULL pointer dereference in free_percent_esc()
Bryan Drewery
12 years ago ebdde42
B
Real fix on i386
Baptiste Daroussin
12 years ago 0604a20
B
Revert "Fix human_number is pkg_printf not being architecture consistent"
Baptiste Daroussin
12 years ago 7f23bf4
B
Fix human_number is pkg_printf not being architecture consistent
Baptiste Daroussin
12 years ago e4a237f
V
Another try to fix va_args problem.
Vsevolod Stakhov
12 years ago 7f554bc
V
Fix va_args usage in pkg_printf.
Vsevolod Stakhov
12 years ago 56df3be
V
Fix format string generation in pkg_printf.
Vsevolod Stakhov
12 years ago 9a89498
M
Merge branch 'pkg_printf'
Matthew Seaman
12 years ago 96a2e4e
M
Actually, change %N to produce the repo identity -- the tag that is used in pkg.conf(5) -- rather than repo name: the basename of the sqlite file and the name the database is mounted as (which is properly of interest only to the inernals of pkg, and not what we want pkg query etc. to display).
Matthew Seaman
12 years ago 2306132
M
Add new %N pkg_printf() escape: Repository name, plus doccumentation and testing for the same.
Matthew Seaman
12 years ago bfba1d1
M
Add three new pkg_printf() formats:
Matthew Seaman
12 years ago 6abc372
M
More pkg_printf() cleanup.
Matthew Seaman
12 years ago 8cf3721
M
Add a %q format -- package architecture
Matthew Seaman
12 years ago 10676e0
M
Pair up all the pkg_xprintf() functions with a pkg_vxprintf() equivalent that takes a va_list structure instead of a variable argument list.
Matthew Seaman
12 years ago f49654d
M
Add pkg_vprintf(3)
Matthew Seaman
12 years ago 7f80320
M
Add new pkg_vfprintf(3) function -- equivalent to vfprintf(3)
Matthew Seaman
12 years ago 9f608b8
M
Add %S as a new format code to print arbitrary character strings.
Matthew Seaman
12 years ago 2761e8a
M
Nuke PKG_INFOS from orbit (it's the only way to be sure.)
Matthew Seaman
12 years ago 8938697
V
Fix time_t cast on i386 platform.
Vsevolod Stakhov
12 years ago ac38130
B
Fix gcc warning
Baptiste Daroussin
12 years ago f78c7ea
B
Make gcc happy
Baptiste Daroussin
12 years ago 7d48c56
M
Shut up erroneous warnings about use of 'val' while uninitialized.
Matthew Seaman
12 years ago 98c4192
M
Reformat the fmt[] array
Matthew Seaman
12 years ago cdf6e4c
M
pkg_printf() needs more args there.
Matthew Seaman
12 years ago 1e2a9bb
M
It's PKG_DESC not PKG_DESCR
Matthew Seaman
12 years ago a990d09
M
Add %e -- package description
Matthew Seaman
12 years ago 8c2ef59
M
Don't spin forever on an out-of-context problem: instead, pass the incorrect format code through unprocessed.
Matthew Seaman
12 years ago cce89c5
M
Move alloc() / free() of struct percent_esc * up a level in the function call tree -- reduce the number of alloc()/free() cycles.
Matthew Seaman
12 years ago a48421c
M
Initialise struct pkg_foo *foo properly so that the pkg_foo iterator works correctly.
Matthew Seaman
12 years ago bd94d38
M
Add support for %A -- Annotations -- to pkg_printf
Matthew Seaman
12 years ago 7de5f47
M
Fix pkg_printf to work with shlibs required/provided
Matthew Seaman
12 years ago a4809d5
M
Add 'restrict' to function prototypes.
Matthew Seaman
12 years ago 2d243b1
M
To clear an sbuf properly, you need to sbuf_finish() it.
Matthew Seaman
12 years ago 177a4b4
M
Sort out confusion between '?' PP_ALTERNATE_FORM1 (flag value for lists), and '#' PP_ALTERNATE_FORM2 (count values for lists)
Matthew Seaman
12 years ago 1330ddf
M
Add tests for format_trailer(), and apply consequential fixes to the code.
Matthew Seaman
12 years ago f8f0b34
M
Reorder pp_fmt_t so that multi-character codes come before single characters. This allows multi-character codes to be used at the top level, and not just in format trailers.
Matthew Seaman
12 years ago d4749d3
M
Allow pkg_printf() functions to take struct 'pkg_foo *' subtypes at the top level, as well as in pkg iterators.
Matthew Seaman
12 years ago d80c454
M
Rework the %-esc parsing as a consequence of shortcomings exposed by work on testing
Matthew Seaman
12 years ago 55d2838
M
Don't eat the escaped character when it's a bogus escape sequence.
Matthew Seaman
12 years ago 732bf4c
M
Octal escape can eat a max of 3 consecutive octal digits.
Matthew Seaman
12 years ago 20756c5
M
Fixup maybe_read_hex_byte() based on results of testing.
Matthew Seaman
12 years ago 3f97984
M
Create a liclog_val() output function (maintaining the same layering as for other output types) even though there's only one place it would get called from.
Matthew Seaman
12 years ago 2214bed
M
Impement tests for gen_format
Matthew Seaman
12 years ago 0c58075
M
Allow for the width of the scale factor (if required) when doing calculations on field-width.
Matthew Seaman
12 years ago 1605f73
M
Implement tests of human_number()
Matthew Seaman
12 years ago d663b82
M
Add a new sub-dir under tests for pkg_printf. This pokes around in the private internals of pkg_printf, so it specially compiles pkg_printf.c using CPP trickery to make all the static functions in there extern. This means it has to be a separate binary from the tests in ../lib
Matthew Seaman
12 years ago 0fc9a5d
M
Split out the typedefs and function prototypes into a new private/pkg_printf.h header. This is to support linking against a test program so that testing can exercise the pkg_printf internals.
Matthew Seaman
12 years ago 1b34f58
M
Add CPP glue to be able to turn off static-ness of internal functions while testing. We don't want these functions generally visible in libpkg.so, but we do want to be able to exercise them individually from within atf.
Matthew Seaman
12 years ago 7f6364c
M
Add many function prototypes. Reorder functions in the file to group similar code together. Fill in the final missing code blocks. Should be complete, bar the debugging,
Matthew Seaman
12 years ago 43ab346
M
Make all the format_foo() functions take the same set of arguments and add a list of prototypes in preparation for getting rid of the big-momma switch statement.
Matthew Seaman
12 years ago 6d4676d
M
Don't use inline -- makes no sense if the function is to be called via a pointer.
Matthew Seaman
12 years ago 4f21786
M
Reformat comment slightly
Matthew Seaman
12 years ago 06b1162
M
Add function pointers to the fmt table.
Matthew Seaman
12 years ago 8a7ec15
M
Add %k for package locking status; goes with the newly committed pkg-lock(8)
Matthew Seaman
12 years ago a528264
M
pkg_printf only missing iterate_item() now. Nearly complete.
Matthew Seaman
12 years ago 55772b3
M
Reinstate pkg_printf just on this topic branch.
Matthew Seaman
12 years ago 52e785d
M
Undo previous flail.
Matthew Seaman
13 years ago 161a805
M
Switch to using variable arglists: this will facilitate printing from all the different pkg struct sub-types.
Matthew Seaman
13 years ago 0837bbd
M
Add the code to iterate through each of the list values
Matthew Seaman
13 years ago 0c41aee
M
Add a dsah of inline. Salt with some default values
Matthew Seaman
13 years ago 863c351
M
Handle out-of-memory conditions more gracefully.
Matthew Seaman
13 years ago af401fc
M
Improve handling of memory allocation. Grab trailing list/separator formatting strings.
Matthew Seaman
13 years ago df7473f
M
Fix up compiler errors and warning in what we have so far.
Matthew Seaman
13 years ago aabbf9d
M
This should be complete for dealing with scalar-valued items. To come: list-valued items.
Matthew Seaman
13 years ago ec1e926
M
Treat %?X as a format modifier for list values (like #)
Matthew Seaman
13 years ago 52ef5f9
M
WIP: Don't keep a running count, just get the answer from the sbuf after processing.
Matthew Seaman
13 years ago 9a0edb4
M
Use flags bitmap rather than individual bool variables.
Matthew Seaman
13 years ago e7e2b7c
M
New functions to format output of pkg data -- work in progress
Matthew Seaman
13 years ago cc2b67b