source: cpp/common/framsg.cpp @ 180

Last change on this file since 180 was 180, checked in by Maciej Komosinski, 6 years ago

Remove fixed length buffers

  • Property svn:eol-style set to native
File size: 831 bytes
Line 
1// This file is a part of the Framsticks GDK.
2// Copyright (C) 2002-2014  Maciej Komosinski and Szymon Ulatowski.  See LICENSE.txt for details.
3// Refer to http://www.framsticks.com/ for further information.
4
5#include "framsg.h"
6#include <common/nonstd_stdio.h>
7#include "stl-util.h"
8#include "Convert.h"
9
10const char* MSG_LEVEL[]={"DEBUG","INFO","WARN","ERROR","CRITICAL"};
11
12void FMprintf_va(const char *o,const char *m,int w,const char *bl,va_list va)
13{
14        string buf=ssprintf_va(bl,va);
15        FramMessage(o,m,buf.c_str(),w);
16}
17
18void FMprintf(const char *o,const char *m,int w,const char *bl, ...)
19{
20        va_list argptr;
21        va_start(argptr,bl);
22        FMprintf_va(o,m,w,bl,argptr);
23        va_end(argptr);
24}
25
26void printFM(const char *bl,...)
27{
28        va_list argptr;
29        va_start(argptr,bl);
30        FMprintf_va("Message","printf",FMLV_INFO,bl,argptr);
31        va_end(argptr);
32}
Note: See TracBrowser for help on using the repository browser.