File: axes.c

package info (click to toggle)
savi 1.5.1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,824 kB
  • sloc: ansic: 6,932; tcl: 5,011; makefile: 265; sh: 237
file content (71 lines) | stat: -rw-r--r-- 1,416 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
 *****************************************************
 *
 *  SaVi by Lloyd Wood (lloydwood@users.sourceforge.net),
 *          Patrick Worfolk (worfolk@alum.mit.edu) and
 *          Robert Thurman.
 *
 *  Copyright (c) 1997 by The Geometry Center.
 *  Also Copyright (c) 2017 by Lloyd Wood.
 *
 *  This file is part of SaVi.  SaVi is free software;
 *  you can redistribute it and/or modify it only under
 *  the terms given in the file COPYRIGHT which you should
 *  have received along with this file.  SaVi may be
 *  obtained from:
 *  http://savi.sourceforge.net/
 *  http://www.geom.uiuc.edu/locate/SaVi
 *
 *****************************************************
 *
 * axes.c
 *
 * $Id: axes.c,v 1.21 2017/01/02 06:11:32 lloydwood Exp $
 */
#include <stdlib.h>

#include "constants.h"
#include "gv_utils.h"
#include "globals.h"
#include "savi.h"


static unsigned int axes_geom_exists = FALSE;

/*
 * axes_on_cmd
 *
 * Display axes in geomview
 */
char *
axes_on_cmd(int argc, char *argv[])
{
  if (axes_geom_exists)
    return EMPTY_str;
  axes_geom_exists = TRUE;

  gv_start();
  gv_create_geomh("Axes", "axes_h");
  gv_stop();

  return EMPTY_str;
}

/*
 * axes_off_cmd
 *
 * Deletes axes in Geomview
 */
char *
axes_off_cmd(int argc, char *argv[])
{
  if (!axes_geom_exists)
    return EMPTY_str;
  axes_geom_exists = FALSE;

  gv_start();
  gv_delete_geom("Axes");
  gv_stop();

  return EMPTY_str;
}