home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 5023 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  971 b 

  1. Path: crayor.dialup.fu-berlin.DE!not-for-mail
  2. From: crayor@zedat.fu-berlin.de (crayor)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: varying-length argument list
  5. Date: 8 Mar 1996 02:38:43 GMT
  6. Organization: Freie Universitaet Berlin
  7. Message-ID: <549.6641T218T2207@zedat.fu-berlin.de>
  8. NNTP-Posting-Host: crayor.dialup.fu-berlin.de (160.45.226.201)
  9. X-Access: 16 17 19
  10. X-Newsreader: THOR 2.22 (Amiga;TCP/IP) *UNREGISTERED*
  11.  
  12. Does anyone know how to code the following function in C?
  13.  
  14. my_sprintf(...)
  15. {
  16.  //should do exactly what sprintf() does and call
  17.  AEPutStr(tmp);
  18.  //afterwards.
  19. }
  20.  
  21. Is there any way to code it in C?
  22. Using va_arg() would mean that I have to recode sprintf(), right?
  23.  
  24. So what I need to know is how to pass the complete parameter list
  25. to sprintf() unmodified.
  26.  
  27. How does sprintf() solve the problem?
  28.  
  29. Crayor
  30. --
  31. AMiGA4000/CyberStorm060 32MB Fast (54MB/s), CyberSCSI/Barracuda 2GB (7MB/s)
  32. Scandoubler/MFCII, A2065 Ethernet, CyberVision 4MB, BSC ISDN MasterII
  33.  
  34.