~ubuntu-branches/ubuntu/lucid/swftools/lucid

« back to all changes in this revision

Viewing changes to lib/as3/common.c

  • Committer: Bazaar Package Importer
  • Author(s): Fabrice Coutadeur
  • Date: 2009-04-30 05:22:19 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090430052219-l1n64qofzeq5pej8
Tags: 0.9.0-0ubuntu1
* New upstream release (LP: #369931)
  - patches/01_manpages: edited to match updated version of src/pdf2swf.1 and
    src/wav2swf.1
  - patches/02_faq: edited to match updated version of FAQ
  - patches/04_makefile: edited to delete the patch on lib/Makefile.in and 
    src/Makefile.in (applied upstream)
  - deleted patch 99_configure_for_python2.5_and_2.6 (applied upstream)
  - debian/swftools.doc: deleted installation of TODO and 
    pdf2swf/HOWTO_pdf2swf as they don't exist anymore

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdlib.h>
 
2
#include <stdio.h>
 
3
#include <stdarg.h>
 
4
#include "files.h"
 
5
#include "common.h"
 
6
 
 
7
int as3_pass = 0;
 
8
int as3_verbosity = 1;
 
9
 
 
10
void as3_error(const char*format, ...)
 
11
{
 
12
    char buf[1024];
 
13
    int l;
 
14
    va_list arglist;
 
15
    if(as3_verbosity<0)
 
16
        exit(1);
 
17
    va_start(arglist, format);
 
18
    vsnprintf(buf, sizeof(buf)-1, format, arglist);
 
19
    va_end(arglist);
 
20
    fprintf(stderr, "%s:%d:%d: error: %s\n", current_filename, current_line, current_column, buf);
 
21
    fflush(stderr);
 
22
    exit(1);
 
23
}
 
24
void as3_warning(const char*format, ...)
 
25
{
 
26
    char buf[1024];
 
27
    int l;
 
28
    va_list arglist;
 
29
    if(as3_verbosity<1)
 
30
        return;
 
31
    va_start(arglist, format);
 
32
    vsnprintf(buf, sizeof(buf)-1, format, arglist);
 
33
    va_end(arglist);
 
34
    fprintf(stdout, "%s:%d:%d: warning: %s\n", current_filename, current_line, current_column, buf);
 
35
    fflush(stdout);
 
36
}
 
37
void as3_softwarning(const char*format, ...)
 
38
{
 
39
    char buf[1024];
 
40
    int l;
 
41
    va_list arglist;
 
42
    if(as3_verbosity<2)
 
43
        return;
 
44
    va_start(arglist, format);
 
45
    vsnprintf(buf, sizeof(buf)-1, format, arglist);
 
46
    va_end(arglist);
 
47
    fprintf(stderr, "%s:%d:%d: warning: %s\n", current_filename, current_line, current_column, buf);
 
48
    fflush(stderr);
 
49
}