Ignore:
Timestamp:
Apr 14, 2002, 1:42:05 AM (23 years ago)
Author:
umoeller
Message:

Lots of changes from the last three weeks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/xstring.c

    r147 r153  
    110110#include <stdlib.h>
    111111#include <stdio.h>
     112#include <stdarg.h>
    112113#include <string.h>
    113114
     
    15231524}
    15241525
     1526/*
     1527 *@@ xstrPrintf:
     1528 *      like sprintf, but prints into an XSTRING
     1529 *      bufer (which must be initialized).
     1530 *
     1531 *      Note that the internal stack buffer is
     1532 *      limited to 2000 bytes, so watch out.
     1533 *
     1534 *@@added V0.9.19 (2002-03-28) [umoeller]
     1535 */
     1536
     1537VOID xstrPrintf(XSTRING *pstr,       // in/out: string buffer (must be init'ed)
     1538                PCSZ pcszFormat,     // in: format string (like with printf)
     1539                ...)                 // in: additional stuff (like with printf)
     1540{
     1541    va_list     args;
     1542    CHAR        szBuf[2000];
     1543
     1544    va_start(args, pcszFormat);
     1545    vsprintf(szBuf, pcszFormat, args);
     1546    va_end(args);
     1547
     1548    xstrcpy(pstr, szBuf, 0);
     1549}
     1550
     1551
    15251552// test case
    15261553
Note: See TracChangeset for help on using the changeset viewer.