mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-05 07:41:11 +00:00
Added missing libsw library
This commit is contained in:
parent
dd5e51c09c
commit
9dff8cfb5a
57 changed files with 13454 additions and 0 deletions
35
external/libsdf/libsw/singlio.c
vendored
Normal file
35
external/libsdf/libsw/singlio.c
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include "protos.h"
|
||||
#include "mpmy.h"
|
||||
#include "Msgs.h"
|
||||
#include "singlio.h"
|
||||
|
||||
static int singl_auto_flush = 1;
|
||||
|
||||
int singlAutoflush(int new){
|
||||
int ret = singl_auto_flush;
|
||||
singl_auto_flush = new;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int singlPrintf(const char *fmt, ...){
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
if(MPMY_Procnum() != 0 )
|
||||
return 0;
|
||||
va_start(ap, fmt);
|
||||
ret = vfprintf(stdout, fmt, ap);
|
||||
va_end(ap);
|
||||
if( singl_auto_flush )
|
||||
fflush(stdout);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void singlFflush(void)
|
||||
{
|
||||
if( MPMY_Procnum() != 0 )
|
||||
return;
|
||||
fflush(stdout);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue