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

« back to all changes in this revision

Viewing changes to massif/hp2ps/Marks.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 <stdio.h>
6
 
#include "Main.h"
7
 
#include "Curves.h"
8
 
#include "Dimensions.h"
9
 
#include "HpFile.h"
10
 
 
11
 
/* own stuff */
12
 
#include "Marks.h"
13
 
 
14
 
static void Caret PROTO((floatish, floatish, floatish));
15
 
 
16
 
void
17
 
Marks()
18
 
{
19
 
    intish i;
20
 
    floatish m;
21
 
 
22
 
    for (i = 0; i < nmarks; i++) {
23
 
        m = ((markmap[i] - samplemap[0]) / xrange) * graphwidth;
24
 
        Caret(xpage(m), ypage(0.0), 4.0);
25
 
    }
26
 
}
27
 
 
28
 
 
29
 
/*
30
 
 * Draw a small white caret at (x,y) with width 2 * d
31
 
 */
32
 
 
33
 
static void
34
 
Caret(x,y,d)
35
 
  floatish x; floatish y; floatish d;
36
 
{
37
 
    fprintf(psfp, "%f %f moveto\n", x - d, y);
38
 
    fprintf(psfp, "%f %f rlineto\n",  d, -d);
39
 
    fprintf(psfp, "%f %f rlineto\n",  d,  d);
40
 
    fprintf(psfp, "closepath\n");
41
 
 
42
 
    fprintf(psfp, "gsave\n");
43
 
    fprintf(psfp, "1.0 setgray\n");
44
 
    fprintf(psfp, "fill\n");
45
 
    fprintf(psfp, "grestore\n");
46
 
    fprintf(psfp, "stroke\n");
47
 
}