Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
exzero.c
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (c) 2011 AT&T Intellectual Property
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * https://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors: Details at https://graphviz.org
9 *************************************************************************/
10
11/*
12 * Glenn Fowler
13 * AT&T Research
14 *
15 * expression library support
16 */
17
18#include <expr/exlib.h>
19
20/*
21 * return 0 value for type
22 */
23
24Extype_t exzero(long int type) {
25 Extype_t v = {0};
26
27 switch (type)
28 {
29 case FLOATING:
30 v.floating = 0.0;
31 break;
32 case INTEGER:
33 case UNSIGNED:
34 v.integer = 0;
35 break;
36 case STRING:
38 break;
39 }
40 return v;
41}
Exstate_t expr
#define UNSIGNED
Definition exparse.c:237
#define FLOATING
Definition exparse.c:239
expr procedure type
Definition exparse.y:211
Extype_t exzero(long int type)
Definition exzero.c:24
#define STRING
Definition gmlparse.c:414
#define INTEGER
Definition gmlparse.c:412
char nullstring[1]
Definition exlib.h:164
char * string
Definition exparse.c:327
long long integer
Definition exparse.c:325
double floating
Definition exparse.c:322