00001 /*@A (C) 1992 Allen I. Holub */ 00002 #include <stdio.h> 00003 #include <stdlib.h> 00004 #include "prnt.h" 00005 00006 /*------------------------------------------------------------------ 00007 * Glue formatting workhorse functions to various environments. One of two 00008 * versions of the workhorse function is used, depending on various #defines: 00009 * 00010 * if ANSI(x) expands to x, uses vsprintf(), a standard ANSI function 00011 * otherwise , uses _doprnt(), standard UNIX function 00012 */ 00013 00014 #include <stdarg.h> 00015 00016 void prnt(void (*ofunct)(int,void *),void *funct_arg,char *format,va_list args) 00017 { 00018 char *buf, *p ; 00019 00020 buf = malloc(256); 00021 vsprintf(buf, format, args); /* prototype is in <stdio.h> */ 00022 for( p = buf; *p ; p++ ) 00023 (*ofunct)( *p, funct_arg ); 00024 free(buf); 00025 } 00026 00027 void stop_prnt( void ){} 00028