GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  UVSZPRINTF (3)

NAME

uvszprintf - Writes formatted data into a buffer, using size and variable arguments. Allegro game programming library.

CONTENTS

Synopsis
Description
See Also

SYNOPSIS

#include <allegro.h>

int uvszprintf(char *buf, int size, const char *format, va_list args);

DESCRIPTION

This is like uszprintf(), but you pass the variable argument list directly, instead of the arguments themselves. Example:

   #include <stdarg.h>
  
   void log_message(const char *format, ...)
   {
      char buffer[100];
      va_list parameters;
     
      va_start(parameters, format);
      uvszprintf(buffer, sizeof(buffer), format, parameters);
      va_end(parameters);
     
      append_buffer_to_logfile(log_name, buffer);
      send_buffer_to_other_networked_players(multicast_ip, buffer);
      and_also_print_it_on_the_screen(cool_font, buffer);
   }
  
   void some_other_function(void)
   {
      log_message("Hello %s, are you %d years old?\n", "Dave", 25);
   }

RETURN VALUE

Returns the number of characters that would have been written without eventual truncation (like with uvsprintf), not including the terminating null character.

SEE ALSO

uconvert(3), uszprintf(3), uvsprintf(3)
Search for    or go to Top of page |  Section 3 |  Main Index


Allegro UVSZPRINTF (3) version 4.4.2

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.