Graphviz 14.1.3~dev.20260124.0732
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 "config.h"
19
20#include <expr/exlib.h>
21
22/*
23 * return 0 value for type
24 */
25
26Extype_t exzero(long int type) {
27 Extype_t v = {0};
28
29 switch (type)
30 {
31 case FLOATING:
32 v.floating = 0.0;
33 break;
34 case INTEGER:
35 case UNSIGNED:
36 v.integer = 0;
37 break;
38 case STRING:
40 break;
41 }
42 return v;
43}
Exstate_t expr
#define UNSIGNED
Definition exparse.h:153
#define FLOATING
Definition exparse.h:155
expr procedure type
Definition exparse.y:208
Extype_t exzero(long int type)
Definition exzero.c:26
#define STRING
Definition gmlparse.h:133
#define INTEGER
Definition gmlparse.h:131
char nullstring[1]
Definition exlib.h:162
long long integer
Definition exparse.h:240
double floating
Definition exparse.h:237
char * string
Definition exparse.h:242