~ubuntu-branches/debian/sid/valgrind/sid

« back to all changes in this revision

Viewing changes to massif/hp2ps/Error.c

  • Committer: Bazaar Package Importer
  • Author(s): Andrés Roldán
  • Date: 2008-06-13 02:31:40 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080613023140-rezbg9gtvybimy2q
Tags: 1:3.3.1-2
* debian/rules:
  - Forgot to copy debian-libc6-dbg.supp to /usr/lib/valgrind. 
    (Closes: #486021)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* This file is part of hp2ps, a graph drawer for memory profiles.
2
 
   Copyright (C) 2002 The University Court of the University of Glasgow.
3
 
   This program is governed by the license contained in the file LICENSE.  */
4
 
 
5
 
#include <stdarg.h>
6
 
#include <stdio.h>
7
 
#include <stdlib.h>
8
 
#include "Main.h"
9
 
#include "Defines.h"
10
 
 
11
 
/* own stuff */
12
 
#include "Error.h"
13
 
 
14
 
/*VARARGS0*/
15
 
void
16
 
Error(const char *fmt, ...)
17
 
{
18
 
    va_list ap;
19
 
    fflush(stdout);
20
 
    fprintf(stderr, "%s: ", programname);
21
 
    va_start(ap, fmt);
22
 
    vfprintf(stderr, fmt, ap);
23
 
    va_end(ap);
24
 
    fprintf(stderr, "\n");
25
 
    exit(1);
26
 
}
27
 
 
28
 
/*VARARGS0*/
29
 
void
30
 
Disaster(const char *fmt, ...)
31
 
{
32
 
    va_list ap;
33
 
    fflush(stdout);
34
 
    fprintf(stderr, "%s: ", programname);
35
 
    fprintf(stderr, " Disaster! (");
36
 
    va_start(ap, fmt);
37
 
    vfprintf(stderr, fmt, ap);
38
 
    va_end(ap);
39
 
    fprintf(stderr, ")\n");
40
 
    exit(1);
41
 
}
42
 
 
43
 
void
44
 
Usage(str)
45
 
  const char *str;
46
 
{
47
 
   if (str) printf("error: %s\n", str);
48
 
   printf("usage: %s -b -d -ef -g -i -p -mn -p -s -tf -y [file[.hp]]\n", programname);
49
 
   printf("where -b  use large title box\n");
50
 
   printf("      -d  sort by standard deviation\n"); 
51
 
   printf("      -ef[in|mm|pt] produce Encapsulated PostScript f units wide (f > 2 inches)\n");
52
 
   printf("      -g  produce output suitable for GHOSTSCRIPT previever\n");
53
 
   printf("      -i[+|-] sort by identifier string (-i+ gives greatest on top) \n"); 
54
 
   printf("      -mn print maximum of n bands (default & max 20)\n");
55
 
   printf("          -m0 removes the band limit altogether\n");
56
 
   printf("      -p  use previous scaling, shading and ordering\n");
57
 
   printf("      -s  use small title box\n");
58
 
   printf("      -tf ignore trace bands which sum below f%% (default 1%%, max 5%%)\n");
59
 
   printf("      -y  traditional\n");
60
 
   printf("      -c  colour ouput\n");
61
 
   exit(0);
62
 
}
63