File: cmtcmd.c

package info (click to toggle)
audacity 2.0.6-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 80,076 kB
  • sloc: cpp: 192,859; ansic: 158,072; sh: 34,021; python: 24,248; lisp: 7,495; makefile: 3,667; xml: 573; perl: 31; sed: 16
file content (53 lines) | stat: -rw-r--r-- 947 bytes parent folder | download | duplicates (14)
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
/* cmtcmd.c -- routines for the moxc side of the command interface */

#include "switches.h"
#include "stdio.h"
#ifdef  AMIGA
#include "exec/types.h"
#include "exec/exec.h"
#endif
#include "cmtcmd.h"
#include "cext.h"
#include "userio.h"
#include "string.h"

#define HASHELEM(p) ((p).symbol_name)
#define HASHVAL 50
#define HASHENTRIES 50
#define HASHENTER lookup
#define HASHNOCOPY

#include "hashrout.h"

void defvar(name, addr)
  char *name;
  int *addr;
{
    int i = lookup(name);
    HASHENTRY(i).symb_type = var_symb_type;
    HASHENTRY(i).ptr.intptr = addr;
}


void defun(name, addr)
  char *name;
  int (*addr)();
{
    int i = lookup(name);
    HASHENTRY(i).symb_type = fn_symb_type;
    HASHENTRY(i).ptr.routine = addr;
}


void defvec(name, addr, size)
  char *name;
  int *addr;
  int size;
{
    int i = lookup(name);
    HASHENTRY(i).symb_type = vec_symb_type;
    HASHENTRY(i).size = size;
    HASHENTRY(i).ptr.intptr = addr;
}