/ani/mrses

To get this branch, use:
bzr branch http://suren.me/webbzr/ani/mrses

« back to all changes in this revision

Viewing changes to cell/msg.c

  • Committer: Suren A. Chilingaryan
  • Date: 2010-04-28 04:30:08 UTC
  • Revision ID: csa@dside.dyndns.org-20100428043008-vd9z0nso9axezvlp
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdio.h>
 
2
#include <stdarg.h>
 
3
 
 
4
void reportError(const char *msg, ...) {
 
5
    char res[1024];
 
6
    
 
7
    va_list ap;
 
8
    
 
9
    va_start(ap, msg);
 
10
    vsnprintf(res, 1024, msg, ap);
 
11
    va_end(ap);
 
12
    
 
13
    printf("%s\n", res);
 
14
}
 
15
 
 
16
void reportMessage(const char *msg, ...) {
 
17
    char res[1024];
 
18
 
 
19
    va_list ap;
 
20
    
 
21
    va_start(ap, msg);
 
22
    vsnprintf(res, 1024, msg, ap);
 
23
    va_end(ap);
 
24
    
 
25
    printf("%s\n", res);
 
26
}