Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

uvsprintf(3alleg4) [plan9 man page]

uvsprintf(3alleg4)						  Allegro manual						uvsprintf(3alleg4)

NAME
uvsprintf - Writes formatted data into a buffer, using variable arguments. Allegro game programming library. SYNOPSIS
#include <allegro.h> int uvsprintf(char *buf, const char *format, va_list args); DESCRIPTION
This is like usprintf(), but you pass the variable argument list directly, instead of the arguments themselves. You can use this function to implement printf like functions, also called variadic functions. You should try to avoid this function because it is very easy to over- flow the destination buffer. Use uvszprintf instead. RETURN VALUE
Returns the number of characters written, not including the terminating null character. SEE ALSO
uconvert(3alleg4), usprintf(3alleg4), uvszprintf(3alleg4) Allegro version 4.4.2 uvsprintf(3alleg4)

Check Out this Related Man Page

uvszprintf(3alleg4)						  Allegro manual					       uvszprintf(3alleg4)

NAME
uvszprintf - Writes formatted data into a buffer, using size and variable arguments. Allegro game programming library. 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? ", "Dave", 25); } RETURN VALUE
Returns the number of characters that would have been written without eventual truncation (like with uvsprintf), not including the termi- nating null character. SEE ALSO
uconvert(3alleg4), uszprintf(3alleg4), uvsprintf(3alleg4) Allegro version 4.4.2 uvszprintf(3alleg4)
Man Page

2 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Shopt -s histappend

What is the point of this? Whenever I close my shell it appends to the history file without adding this. I have never seen it overwrite my history file. # When the shell exits, append to the history file instead of overwriting it shopt -s histappend (3 Replies)
Discussion started by: cokedude
3 Replies

2. UNIX for Advanced & Expert Users

What's your most useful shell?

What's your most useful shell? /bin/sh /bin/csh /bin/ksh /bin/tcsh /bin/bash (249 Replies)
Discussion started by: zylwyz
249 Replies