Utility Library autodoc oversight
Utility Library autodoc oversight
The current public autodoc for the Utility Library omits description for functions SNPrintf() and ASPrintf() - only VSNPrintf() and VASPrintf() are documented. To add to the confusion, VSNPrintf() and VASPrintf() give code examples that instead use SNPrintf() and ASPrintf(), respectively.
The Rear Window blog
AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Re: Utility Library autodoc oversight
Isn't it the same for all functions with a varargs version, only one version is in the autodoc? In other libraries it's probably only functions with TagItem arguments which have 2 versions, one with a pointer to a TagItem array and the varargs version, (V)SNPrintf() and (V)ASPrintf() may be the only ones not using struct TagItem, but it's still the same.trixie wrote:The current public autodoc for the Utility Library omits description for functions SNPrintf() and ASPrintf() - only VSNPrintf() and VASPrintf() are documented. To add to the confusion, VSNPrintf() and VASPrintf() give code examples that instead use SNPrintf() and ASPrintf(), respectively.
Re: Utility Library autodoc oversight
@joerg
- the autodoc gives no synopsis for SNPrintf() and ASPrintf() at all (looks like the functions don't even exist);
- looking for SNPrintf() under "V" in the functions list is confusing at best - it's different from, for example, AllocSysObject() where both versions are easy to find. For the sake of clarity and logical referencing I'd suggest making a little exception here and providing two separate entries.
It is, but here:joerg wrote:Isn't it the same for all functions with a varargs version, only one version is in the autodoc?
- the autodoc gives no synopsis for SNPrintf() and ASPrintf() at all (looks like the functions don't even exist);
- looking for SNPrintf() under "V" in the functions list is confusing at best - it's different from, for example, AllocSysObject() where both versions are easy to find. For the sake of clarity and logical referencing I'd suggest making a little exception here and providing two separate entries.
The Rear Window blog
AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Re: Utility Library autodoc oversight
IMHO replacing VSNprintf() and VASPrintf() by SNPrintf() and ASPrintf() in the autodoc would be enough (with the V* versions added in SYNOPSIS), unlike the non-varags versions of tag functions with a taglist pointer I doubt anyone uses the V*Printf() versions with an args pointer.trixie wrote:It is, but here:
- the autodoc gives no synopsis for SNPrintf() and ASPrintf() at all (looks like the functions don't even exist);
- looking for SNPrintf() under "V" in the functions list is confusing at best - it's different from, for example, AllocSysObject() where both versions are easy to find. For the sake of clarity and logical referencing I'd suggest making a little exception here and providing two separate entries.
- colinw
- AmigaOS Core Developer
- Posts: 207
- Joined: Mon Aug 15, 2011 9:20 am
- Location: Brisbane, QLD. Australia.
Re: Utility Library autodoc oversight
I had the same problem in DOS with Printf() and VPrintf(), people kept telling me the autodoc was missing,trixie wrote: - the autodoc gives no synopsis for SNPrintf() and ASPrintf() at all (looks like the functions don't even exist);
because they were completely different names, so I just duplicated the autodoc and put one under each name,
while mentioning the other in each. It fixed the problem just fine.