Panu Matilainen
d8777387db
Simplify / sanitize expandU() a bit
...
- Instead of saving and restoring the bits we'll mess with, just
make a temporary expansion state struct with non-buffer state
copied from "parent".
2010-09-27 14:55:12 +03:00
Panu Matilainen
49f99b8656
Dynamically reallocate macro expansion buffer (ticket #45 )
...
- Eliminate the underlying limitation of macro expansion limit by
growing the buffer as needed when adding characters to it. This
doesn't fix the entire issue yet however: expandU() and expandMacros()
are still limited to caller-specified buffer size, and output
from lua-macros isn't dynamically resized. One step at a time...
2010-09-27 14:55:12 +03:00
Panu Matilainen
61a3fc4523
Let expandMacro() allocate its own buffer
...
- More pre-requisites for dynamic buffer resizing, callers have no
clue how much expandMacro() is going to need.
2010-09-27 14:55:12 +03:00
Panu Matilainen
dc258bac41
Track current expansion point via distance to buffer start
...
- Supposedly no functional changes, just paving way for dynamic
buffer resizing which is impossible when accessing pointers directly.
2010-09-27 14:55:12 +03:00
Panu Matilainen
568ba0d242
Push the macro buffer size limit down by one level
...
- Turn expandMacros() into a wrapper around internal doExpandMacros()
which returns the expanded string in a newly allocated buffer, use
the internal version for rpmExpand() too.
2010-09-27 14:55:12 +03:00
Panu Matilainen
a931202422
Eliminate unused spec field from macro expansion state struct
2010-09-27 14:55:11 +03:00
Panu Matilainen
8082eb48db
Avoid calloc() in macro findEntry()
...
- It's just the macro name we're grabbing here, that ought to fit
on stack comfortably enough.
2010-09-27 14:55:11 +03:00
Panu Matilainen
ebc4ceaaeb
Avoid unnecessary round-trip through expandT() where possible
...
- In the cases where expandT() was called with strlen(source) we can
now just bypass it and call expandMacro() directly, avoiding an
unnecessary string copy.
2010-09-27 14:55:11 +03:00
Panu Matilainen
ccba5236a0
Use function arguments to pass, duh, arguments into functions. Duh.
...
- No functional changes, just eliminating mindless save-and-restore
ping-pong through macro expansion state struct.
2010-09-27 14:55:11 +03:00
Jindrich Novy
4c41013eeb
Fix segfault in rpmdeps (RhBug:637357)
2010-09-26 18:45:34 +02:00
Panu Matilainen
f7e058a01e
Eliminate separate fileIndexEntry from rpmal
...
- This is exactly the same structure as availableIndexEntry, no need
for a different struct for it.
2010-09-22 16:37:12 +03:00
Panu Matilainen
447e80f96a
Use headerNextTag() for header format iteration
...
- Doesn't really win anything performance-wise but makes the code nicer
2010-09-22 14:28:32 +03:00
Panu Matilainen
b4111d5123
Use HEADER_MAGIC_FOO enums instead of 0/1 in python header code
2010-09-22 09:46:25 +03:00
Panu Matilainen
79301695ce
Remove double const in urlstring struct
2010-09-22 09:22:39 +03:00
Panu Matilainen
5d5cb6dce7
Make rpmsqAction compatible to sa_sigaction
2010-09-22 09:22:39 +03:00
Hajime Taira
75a53aa616
l10n: Updated Japanese (ja) translation to 100%
...
New status: 732 messages complete with 0 fuzzies and 0 untranslated.
Transmitted-via: Transifex (www.transifex.net).
2010-09-21 22:27:34 +00:00
Panu Matilainen
35a1706291
Remove double const on rpmrc tables
2010-09-21 16:57:08 +03:00
Panu Matilainen
072ea21699
Fix rpmRC/int return mismatch by counting errors from handleOneTrigger
2010-09-21 16:43:46 +03:00
Panu Matilainen
2425a002dc
Use rpmTag as psm scriptTag for type correctness
2010-09-21 16:40:28 +03:00
Panu Matilainen
2508fedea0
Default to the common case wrt dir name/index tags, not relocation
...
- Avoids an unnecessary extra initialization in the common case, and
also avoids int/enum mismatch from initializing to 0.
2010-09-21 16:35:10 +03:00
Panu Matilainen
b11c895bdd
Move PTOK type enum out of the sprintfToken struct
...
- While legal in C++, the enum and its values are only visible within
the scope it was declared in, making it invisible to the rest of
the program.
2010-09-21 16:28:34 +03:00
Panu Matilainen
af57879ea0
Remove bunch of double consts in librpmbuild
2010-09-21 16:18:22 +03:00
Panu Matilainen
312ceee392
Initialize nametag to RPMTAG_NOT_FOUND in parseRCPOT()
...
- Doesn't matter what the value is, the switch (somewhat hysterically)
makes it default to RPMTAG_REQUIRENAME in unknown cases anyway
2010-09-21 15:55:02 +03:00
Panu Matilainen
add59e49ea
Const pedantry: taropts only ever points to string constants
2010-09-21 15:53:38 +03:00
Panu Matilainen
7723fef264
Move expression type enum out of the struct
...
- While legal in C++, the enum and its values are only visible within
the scope it was declared in, making it invisible to the rest of
the program.
2010-09-21 15:38:41 +03:00
Panu Matilainen
4b06c4995d
Use actual enum values in tag table sentinel to avoid int/enum mismatch
...
- tagLoadIndex() looks for NULL in tag name, the other values aren't
looked at so it doesn't matter...
2010-09-21 15:26:25 +03:00
Panu Matilainen
8b7ff12b4e
Add "c++ protection" to (hopefully) all of our internal headers
2010-09-21 15:21:12 +03:00
Panu Matilainen
662c09717a
Missing c++ end marker in rpmdb_internal.h, oops
2010-09-21 15:17:46 +03:00
Panu Matilainen
7d0790d2fe
Add "C++ protection" to the public rpmutil.h header, oops...
2010-09-21 15:13:02 +03:00
Panu Matilainen
df960a66cf
void stepping on toes of relatives, part 5
...
- Eliminate remaining (hopefully) C++ reserved keywords in rpmbuild cli tool
2010-09-21 15:11:04 +03:00
Panu Matilainen
0e4d3de131
Avoid stepping on toes of relatives, part 4
...
- Eliminate remaining (hopefully) C++ reserved keywords in librpm
2010-09-21 15:08:08 +03:00
Panu Matilainen
c60bf8f766
Avoid stepping on toes of relatives, part 3
...
- Eliminate remaining (hopefully) C++ reserved keywords in librpmbuild
2010-09-21 15:07:08 +03:00
Panu Matilainen
7e53dc6ee1
Avoid stepping on toes of relatives, part 2
...
- Eliminate uses of "class" which is a reserved keyword in C++
2010-09-21 15:02:43 +03:00
Panu Matilainen
b9cd5a5e74
Avoid stepping on toes of relatives, part 1
...
- Eliminate uses of "this" which is a reserved keyword in C++
2010-09-21 14:55:03 +03:00
Panu Matilainen
5d79b79c1b
Queryformat string sanity in queryArgCallback()
...
- Use our string helper functions instead of manual length calculations
and allocations
2010-09-21 14:50:40 +03:00
Panu Matilainen
6255825811
Use rasprintf() instead of manual alloc + sprintf()
2010-09-21 14:49:36 +03:00
Panu Matilainen
45159a7060
Rename tagtbl.c -> tagtbl.C
...
- This isn't a regular source file: its not compiled as such but only
included from tagname.c. Rename to disambiguate, and make it similar
to rpmhash.[CH]
2010-09-21 14:47:46 +03:00
Panu Matilainen
6ae1fae20f
Use the macro allocator variants within librpm*
2010-09-21 14:47:14 +03:00
Panu Matilainen
67a3e424ed
Use _free() instead of rfree() where "return value" is assigned
2010-09-21 14:34:33 +03:00
Panu Matilainen
e3e69b44e5
Return explicit NULL from various fooFree() functions everywhere
2010-09-21 14:26:29 +03:00
Panu Matilainen
a43c15eadf
Return typed pointers from rpmluaFree() and rpmluavFree()
2010-09-21 14:22:29 +03:00
Panu Matilainen
ee6c33c9c2
Return typed pointer from headerformat cacheFree()
2010-09-21 14:19:11 +03:00
Panu Matilainen
96f0bd8c50
Return typed pointer from freeHardLink()
2010-09-21 14:16:23 +03:00
Panu Matilainen
dec8d8de30
Use typed instead of void pointer for fsm dnl iterator
...
- Passing a void pointer for an internal helper function which
casts to the destination is just ... pfff.
2010-09-21 14:14:29 +03:00
Panu Matilainen
2be8dd317c
Use typed instead of void pointer for fsm map iterator
...
- Passing a void pointer for an internal helper function which
casts to the destination is just ... pfff.
2010-09-21 14:12:55 +03:00
Panu Matilainen
b50c537b5c
Adjust pgpMpiSet() dest type to match actual use
2010-09-21 14:04:44 +03:00
Panu Matilainen
0ebc7a4e39
Error string is const char *, not void pointer
2010-09-21 14:03:43 +03:00
Panu Matilainen
0ccbd8fe6e
Adjust internal io read, write and digest update to take buf as void pointer
...
- This matches ffread() and read() much better, avoiding pile of casts.
- By some stroke of genious, glibc cookie interfaces disagree with the
other file stream protos by using char * for buf. Argh. Add explicit
cast for the schizophrenia.
2010-09-21 13:43:48 +03:00
Panu Matilainen
a82633c2a3
Avoid using void pointer when we have a real type for the memfail function
2010-09-21 13:41:25 +03:00
Panu Matilainen
892bf4eb86
Move the RPMVERSION constant among its friends in depends.c
...
- Doesn't make any difference, just grouping similar goo in one spot.
2010-09-21 13:39:25 +03:00