Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
History of file src/appendf.c at check-in eeb7706e6e510205
2025-03-25
| ||
13:49 | Initial work for porting over [fossil:/timeline?r=artifact-to-json]. The API skeleton is in place but the core to-json is not. file: [5cc3697641] check-in: [0c7c6d665d] user: stephan branch: artifact-to-json, size: 55462 | |
2024-12-14
| ||
00:35 | Minor formatting tweaks. No functional changes. file: [4c9246eda4] check-in: [73aca2454e] user: stephan branch: trunk, size: 55245 | |
2024-12-08
| ||
22:11 | Rename some internal vars for clarity's sake. file: [710c1dd34c] check-in: [fa7ef96f90] user: stephan branch: trunk, size: 55293 | |
2024-12-07
| ||
03:14 | Remove unnecessary OMIT and ENABLE flags from appendf.c - they were ancient artifacts from a several-source-trees-ago version of that file. Also remove appendf.c's use of long double for reasons documented in this change's comments. file: [c75fb32d52] check-in: [d3533b0365] user: stephan branch: trunk, size: 55271 | |
02:53 | Add a TODO which will be relevant for porting over the mergeinfo bits, specifically for the glob_expr() function (which is also to-port). file: [31e12fde16] check-in: [0ea42c1b3e] user: stephan branch: trunk, size: 57087 | |
01:45 | Add a TODO to port over fossil's etSHELLESC string formatting option (for building properly-escape strings for passing to an external process). It's a more involved port than current aspirations allow for :/. file: [68eb1662d0] check-in: [a1e5c8034d] user: stephan branch: trunk, size: 56898 | |
2023-11-22
| ||
11:54 | s/__unused/fsl__unused as discussed in /chat with stephan@ to help avoid name collisions with package maintainers; no functional change intended file: [5a98c81e03] check-in: [230cf225fc] user: mark branch: trunk, size: 56766 | |
2022-11-12
| ||
09:45 | Update some old appendf.c return semantics to the newer semantics. file: [47ef319b88] check-in: [0a13ca28c8] user: stephan branch: trunk, size: 56763 | |
2022-06-27
| ||
08:59 | Replaced the fallthrough __attribute__ with a more portable macro. Added an #ifdef check for __unused, as my compiler (clang 10) doesn't know it. file: [0649c8dd32] check-in: [ed4d246451] user: stephan branch: trunk, size: 56744 | |
07:18 | Tag ("(void)var;", or "__unused") vars that are not used, tag switch/case fallthroughs w/ __attribute ((fallthrough)); file: [597574052a] check-in: [73ee02a8fe] user: bch branch: trunk, size: 56832 | |
07:06 | Remove assertion that is true by definition. An unsigned int is always >= 0. file: [50e1e04665] check-in: [549008b363] user: bch branch: trunk, size: 56742 | |
2022-05-17
| ||
10:37 | Removed use of a VLA in appendf.c because C11 makes that feature optional and MSVC does not implement it. file: [d342103ba1] check-in: [f913a0611c] user: stephan branch: trunk, size: 56758 | |
2021-12-29
| ||
22:58 | Add backspace and form-feed to the characters escaped in the previous commit. file: [331e564be7] check-in: [ae8e038bdb] user: stephan branch: trunk, size: 56515 | |
22:49 | appendf json formatting: emit tabs as \t instead of \u0009. file: [96016619ab] check-in: [50ebe24a14] user: stephan branch: trunk, size: 56439 | |
2021-12-23
| ||
14:00 | Fixed a bit of a braindead bug in the %s appendf specifier which caused exponential strlen counting on the fsl_diff_v2() internals. This went unnoticed until Mark fed it a huge diff and the diff time went from a small fraction of a second to a minute or more. file: [7e46615a29] check-in: [c6b3279322] user: stephan branch: trunk, size: 56350 | |
2021-12-21
| ||
20:21 | Removed the fossil- name prefix from include/fossil-scm/*.h. file: [3a385acea2] check-in: [43a9bea8d5] user: stephan branch: trunk, size: 56344 | |
2021-11-16
| ||
05:39 | Another appendf() string length fix for NULL %Q. file: [2398206222] check-in: [cf2b9bb0f2] user: stephan branch: trunk, size: 56358 | |
04:54 | fsl_appendf() precision length fix for SQL formatting. file: [0844e4b580] check-in: [025041fc9d] user: stephan branch: trunk, size: 56291 | |
2021-11-13
| ||
04:13 | Fixed HTML decoding (%T appendf specifier) range problem reported at [https://fossil-scm.org/forum/forumpost/cb564acd01] and fix adjacent string-length bugs. file: [4552cd2a05] check-in: [70f66a328d] user: stephan branch: trunk, size: 56275 | |
2021-11-01
| ||
21:22 | Fixed %B fsl_appendf() quoting, which was apparently broken in recent refactoring. file: [f1e7ce14fe] check-in: [254d05efc3] user: stephan branch: trunk, size: 56085 | |
2021-10-22
| ||
03:14 | API doc update, fixed a potential range problem in the appendf SQL string formatting options. file: [eb7d669271] check-in: [543bea7b3e] user: stephan branch: trunk, size: 56033 | |
02:48 | Refactored appendf %q/%Q/%B to use a static buffer instead of dynamic allocation. This saves counting the output length in advance and allocation of that output buffer but requires one call to the callback per 512-ish bytes of the string. file: [cc0729d671] check-in: [5739c3cbd3] user: stephan branch: trunk, size: 56022 | |
2021-10-21
| ||
20:42 | Added %!Q form of %Q appendf modifier to take the place of the undocumented/unused %w: wraps result in double quotes instead of single, for use with identifiers. file: [aa3cbaab2c] check-in: [d92aae901d] user: stephan branch: trunk, size: 57233 | |
2021-10-16
| ||
16:24 | Minor code reorgs and reminders to self for the continued merge porting later on. file: [7950ca63f9] check-in: [81e6402728] user: stephan branch: port-merge, size: 56679 | |
2021-10-11
| ||
10:46 | Minor internal doc correction. file: [12645d7ece] check-in: [cf92163fc2] user: stephan branch: trunk, size: 56611 | |
02:53 | Minor internal doc and test updates. file: [1ddacb5006] check-in: [7933b213f4] user: stephan branch: trunk, size: 56611 | |
02:07 | Hardening of the new %#W.Ps handling against non-UTF8 input and character lead bytes which invalidly set at the end of a string. file: [32018e2537] check-in: [3036e117df] user: stephan branch: trunk, size: 56496 | |
2021-10-10
| ||
13:09 | Added '#' format modifier for fsl_appendf() %s, which causes it to count width and precision in UTF8 characters instead of bytes. This allows the split-mode diff renderer to measure its columns in characters instead of bytes and avoid truncating multibyte characters. file: [3c624bc352] check-in: [4432b1f97a] user: stephan branch: trunk, size: 55605 | |
2021-09-26
| ||
15:58 | fsl_appendf() %j (JSON string) now supports the .* modifier to limit how much of the string is output, with the caveat that it is not multibyte-aware so will happily truncate a multibyte character. This was necessary for JSON-ifying partial lines of diffs when porting in fossil's 2021-09 JSON diff builder. file: [5b27f66de5] check-in: [2936a80e9f] user: stephan branch: trunk, size: 54121 | |
2021-09-18
| ||
10:39 | Changed semantics of fsl_appendf() to 0 on success, non-0 on error. Removed fsl_appendf_f() and replaced its uses with fsl_output_f(). Be on the lookout for subtle bugs, but the old printf()-style return semantics have never been relied upon so this should be side-effect-free. file: [a115b3ac85] check-in: [b2e283edbf] user: stephan branch: trunk, size: 53833 | |
2021-04-13
| ||
15:18 | Added fsl_deck_branch_set() and f-test-ciwoco now uses it. Fixed a _potential_ error-catching bug in the %j fsl_appendf() handler (which is still pending a port to fsl_output_f() return semantics). file: [fa0d1f37ad] check-in: [e9aed30c66] user: stephan branch: trunk, size: 55845 | |
2021-03-15
| ||
05:53 | fsl_appendf(): ported in comma-separated decimals from [fossil:2cdbdbb1c9b7ad2b]. file: [a31c57bfc6] check-in: [5f6954fc89] user: stephan branch: trunk, size: 55847 | |
2021-02-24
| ||
19:34 | fsl_appendf() %j now emits "null" (always without quotes) when passed a NULL pointer. file: [a3be10a784] check-in: [b1e8da4fa7] user: stephan branch: trunk, size: 55238 | |
09:28 | Removed some dead code. Added %j (JSON string) encoding to fsl_appendf() using a streaming approach (no allocation). file: [bb795f6fe2] check-in: [a008179c2d] user: stephan branch: trunk, size: 55171 | |
2021-02-15
| ||
03:24 | Renamed src/fsl_appendf.c → src/appendf.c. Renamed src/fsl_XYZ.c to src/XYZ.c. f-checkin vfile dump now includes renames. file: [548ed30687] check-in: [ed3183170a] user: stephan branch: trunk, size: 51735 | |
2021-02-13
| ||
05:52 | Updated attachment crosslinking to account for technote attachments. file: [548ed30687] check-in: [08ecc42a5f] user: stephan branch: trunk, size: 51735 | |
2021-02-12
| ||
22:09 | libfossil is now C99, rather than C89, per discussion at [https://fossil.wanderinghorse.net/r/libfossil-forum/forumpost/e02ff0e8d0]. fsl_int{16,32,64}_t have been replaced by the standard uint{16,32,64}_t, FSL_xxx_T_PFMT/SFMT replaced with PRIx32 and friends, and auto.def now checks for -std=c99 capability (but that check could probably be done differently/improved). fsl_int_t and fsl_uint_t are retained, as they're more about documentation/intent than fixed sizes. file: [67e2cada37] check-in: [ee070353b9] user: stephan branch: trunk, size: 51376 | |
2021-02-09
| ||
00:18 | Updated license text in almost all C/H to claim copyright while attributing all of the files as heavily derived from DRH's work. file: [ad6e1eca2f] check-in: [631fb3f69a] user: stephan branch: trunk, size: 51396 | |
2021-02-07
| ||
14:31 | Globally replaced http://... URLs with https://.... Most of them probably still work, too. file: [1849f9ea43] check-in: [6af7b3b7c8] user: stephan branch: trunk, size: 51015 | |
2016-01-24
| ||
02:04 | an admittedly untested changed to etPATH handling ('%/' specifier) tweak in fsl_appendf(), to avoid allocating for 0-length strings. file: [807c45820a] check-in: [965a326ce2] user: stephan branch: trunk, size: 51013 | |
2015-07-23
| ||
14:51 | back-port in some precision/width overflow fixes from https://www.sqlite.org/src/info/aeca95ac77f6f320 file: [7dc366b0b7] check-in: [ac6f25aaba] user: stephan branch: trunk, size: 50984 | |
2014-03-28
| ||
21:33 | All sorts of minor warning fixes revealed by compiling the amalgamation in Qt Creator. fsl_delta.c is not warning-free yet b/c my attempts to fix the signedness complaints have broken it. file: [06a9ce0207] check-in: [cb99e115a4] user: stephan branch: trunk, size: 50753 | |
2014-03-27
| ||
19:59 | fixed a memory misuse in the %z fsl_buffer_appendf() specifier. file: [f3ded567c9] check-in: [77cb96a0f7] user: stephan branch: trunk, size: 50736 | |
2014-03-26
| ||
15:42 | minor internal cleanups. Nothing functional. file: [56f438c926] check-in: [fbf48bc585] user: stephan branch: trunk, size: 50666 | |
2014-03-18
| ||
22:35 | Discovered a descrepancy between fossil(1) and libfossil's %T custom format specifier. So far we never use that one, so a change will not be painful. Discovered/ported in fossil(1)'s %S (UUID-short-string) format specifier. file: [d15c079bae] check-in: [3cc5216eb1] user: stephan branch: trunk, size: 50525 | |
2014-02-14
| ||
09:05 | Globally changes the API docs from fossil/sqlite-style '**' to Doxygen-friendly format because the extra stars hinder writability/changability and require an extra filter at the doxygen-processing level. file: [87cedbe455] check-in: [a2cbd2e343] user: stephan branch: trunk, size: 50202 | |
2013-09-08
| ||
10:21 | moved fsl_malloc/free/realloc() to fossil-util.h. Minor cleanups in fsl_appendf() and f-ls. file: [615a41c253] check-in: [f50c561594] user: stephan branch: trunk, size: 50202 | |
09:41 | malloc() optimization for space padding in fsl_appendf(). No longer allocates in C89 mode (no var-arrays) unless the padding is abnormally large (todo: use a loop in that case). file: [74856a2165] check-in: [13b634d6b4] user: stephan branch: trunk, size: 50183 | |
2013-09-05
| ||
18:47 | Added %#F (fossilize, alternate form) after stumbling across it in fossil(1). file: [4f4b97965e] check-in: [4ff4b82340] user: stephan branch: trunk, size: 49829 | |
2013-08-24
| ||
09:48 | Fixed the (dumb) sprintf sizeof/va-list bug. i was passing a va_list to a ... func. file: [512718ee23] check-in: [0895a27816] user: stephan branch: trunk, size: 49707 | |
2013-08-21
| ||
21:50 | oops. signed==>unsigned. file: [caa3fb679b] check-in: [a64cf10a48] user: stephan branch: trunk, size: 49721 | |
20:04 | Tracked down, characterized, and documented a va_list-related gotcha in fsl_appendfv() (and all derived functionality) for certain combinations of sizeof()s and format specifiers. file: [ac8eee0819] check-in: [764a17787a] user: stephan branch: trunk, size: 49720 | |
16:23 | Switched to project-local typedefs in the etRADIX bits. "Should" be no side-effects for sane builds. file: [bdc11cb052] check-in: [6cb491da2a] user: stephan branch: trunk, size: 49706 | |
2013-08-19
| ||
19:29 | Added EVENT crosslinking. Can now losslessly round-trip EVENT manifests. Minor changes to support seconds-precision (not msec-precision) on E-cards b/c that is how fossil(1) does it. Fixed bugs in the E-card card-is-legal validation. file: [e350b3568e] check-in: [ec268be7f0] user: stephan branch: trunk, size: 49694 | |
2013-08-17
| ||
13:11 | Renamed some functions, started moving the fsl_cx-specific code into fsl_cx.c. Added fsl_fatal(). file: [8b079199bc] check-in: [cd522883eb] user: stephan branch: trunk, size: 49705 | |
2013-08-16
| ||
20:04 | Added fsl_deck_unshuffle() to sort any lists which need it and to calculate the R-card (that card works now). Fixed a memleak in fsl_acache_clear. A bit of API renaming and refactoring. file: [994f1c2065] check-in: [6dc5c4ab76] user: stephan branch: trunk, size: 49565 | |
01:42 | Ported in wiki manifest crosslinking. Untested - lacking some bits needed to test it. file: [40882ea3d9] check-in: [1221ecaa56] user: stephan branch: trunk, size: 49526 | |
2013-08-13
| ||
18:35 | Successfully round-trip parsed/output a basic manifest (T, U, D cards). file: [2f792ea8e2] check-in: [005bc0786e] user: stephan branch: trunk, size: 48160 | |
13:17 | Renamed header files from fossil/*.h to fossil-scm/*.h, to avoid any potential confusion with the fossil FS or other fossils out there. file: [96a34240a0] check-in: [99a4a0ff23] user: stephan branch: trunk, size: 48137 | |
2013-08-09
| ||
19:30 | "char used as index for array" error file: [8471dfcc15] check-in: [97c2165235] user: bch branch: bch_hack, size: 48133 | |
2013-08-08
| ||
16:32 | Renamed fsl_appendf.c → src/fsl_appendf.c. moved main sources into src/. moved fsl_internal.h to include/fossil. file: [4b2aba8c94] check-in: [dd9401360d] user: stephan branch: autosetup, size: 48123 | |
2013-08-03
| ||
20:43 | Ported in %F (Fossilize) to fsl_appendfv(). file: [4b2aba8c94] check-in: [c2f8cff8a3] user: stephan branch: trunk, size: 48123 | |
13:08 | More manifest work. Added T card support. Renamed some APIs. file: [9a73eb3568] check-in: [84e5b5d499] user: stephan branch: trunk, size: 47525 | |
2013-07-31
| ||
14:39 | s/fossil2.h/fossil.h/g file: [8089d2b489] check-in: [9c20ce5c00] user: stephan branch: trunk, size: 47170 | |
2013-07-30
| ||
09:50 | Refactored how we keep track of f->dbMain. It is now a pointer/alias for one of (dbCkout, dbConfig, dbRepo). Then forgot to check in before porting in %b/%B format specifiers for fsl_appendf(). file: [5a182c5246] check-in: [3fb14b6900] user: stephan branch: trunk, size: 47171 | |
2013-07-27
| ||
18:40 | Ported in %/ (path) handling from v1's printf() impl. file: [7919a28477] check-in: [3f047bc25e] user: stephan branch: trunk, size: 45922 | |
2013-07-25
| ||
17:16 | Renamed fsl_appendf.c → src/fsl_appendf.c. move source code to ./src dir file: [b0105f0214] check-in: [6c59afb005] user: bch branch: nbsd, size: 44826 | |
08:37 | fixed a use of free(), now that fsl_free() can be used without a context ptr. file: [b0105f0214] check-in: [db0a915e61] user: stephan branch: trunk, size: 44826 | |
06:42 | removed the fsl_ctx arg from routines where it was only used for the allocator. file: [a78aa84251] check-in: [52fd2ce85c] user: stephan branch: trunk, size: 45174 | |
06:33 | Removed fsl_ctx::allocator, made it a library-wide setting. Started simplifying APIs which use the ctx only for allocation purposes. file: [81a96460fa] check-in: [c4354d5bb0] user: stephan branch: trunk, size: 45212 | |
2013-07-24
| ||
11:17 | Moved fsl_appendf.h content into fossil2.h. file: [65f7e90e7a] check-in: [9544d2c21a] user: stephan branch: trunk, size: 45215 | |
2013-07-23
| ||
20:01 | minor cleanups and additions. time for a pinball break. file: [103f415a17] check-in: [12abd29051] user: stephan branch: trunk, size: 45238 | |
17:38 | re-indented for project conventions but a lot of {} are still not project-conventional. file: [5c0b14ec30] check-in: [b8c2e110ac] user: stephan branch: trunk, size: 45172 | |
17:27 | minor cleanups. file: [b5adf2c874] check-in: [ed77cdbe79] user: stephan branch: trunk, size: 45245 | |
17:19 | fixed an uninitialized var (would have let to invalid memory size at some point). file: [6276599a92] check-in: [944a2bcd31] user: stephan branch: trunk, size: 45271 | |
17:18 | Fixed a couple potential (compiler-dependent) bugs involving order of declarations in conjunction with va_start/va_end. More docs. file: [b93c366d6b] check-in: [fb6fdbea37] user: stephan branch: trunk, size: 45252 | |
16:45 | Added emacs/vim modelines. Re-indented for fv1 conventions. file: [0e75615e7a] check-in: [60d011ad38] user: stephan branch: trunk, size: 45232 | |
16:06 | s/fsl_appendf_appender/fsl_appendf_f/g, for consistency. file: [fe6db92586] check-in: [8df7b328c9] user: stephan branch: trunk, size: 45208 | |
16:02 | Ported in/added various xxx_appendf() implementations, including fsl_mprintf() and friends. file: [f62d29679c] check-in: [87cf2a0d42] user: stephan branch: trunk, size: 45313 | |
15:30 | Added: Moved public header(s) to include/fossil/. Ported in callback-using printf impl. (This code was originally stolen from sqlite3 back in 2008, actually.) file: [40a1c0669b] check-in: [88a070017a] user: stephan branch: trunk, size: 46674 | |