pwn 0.4.671 → 0.4.673
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/bin/pwn_nmap_discover_tcp_udp +31 -5
- data/lib/pwn/version.rb +1 -1
- metadata +1 -2
- data/.each do |bytes_matched| +0 -271
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66259ccdc59be89f796f56e88a20f9eb5bef320c46a4b7fc268b62f664e50c6e
|
4
|
+
data.tar.gz: 162ad18b794121a96802d6f5de739b4fc22eb8c0dda0a780fc6144fedc107af3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e6515b72bf8b01805b50cc9e5bb701edf2fb725182c1a1c425188e8d2542badd19cd93cbdf4c358fc2c2cfcb9c49341b4322cc76d596a200548eebe73c4ffd4
|
7
|
+
data.tar.gz: 846a1b1ca1f1ef9bc2affdb57ea1accf45f210e86085da968b54d01e45e9f6d6103f8108a7ef7a2888f4ebadd57988f68afafea86925f8c7c4867915388c36a7
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.2.2@pwn
|
|
37
37
|
$ rvm list gemsets
|
38
38
|
$ gem install --verbose pwn
|
39
39
|
$ pwn
|
40
|
-
pwn[v0.4.
|
40
|
+
pwn[v0.4.673]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.2.2@pwn
|
|
52
52
|
$ gem uninstall --all --executables pwn
|
53
53
|
$ gem install --verbose pwn
|
54
54
|
$ pwn
|
55
|
-
pwn[v0.4.
|
55
|
+
pwn[v0.4.673]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
@@ -2,7 +2,6 @@
|
|
2
2
|
# frozen_string_literal: false
|
3
3
|
|
4
4
|
require 'optparse'
|
5
|
-
require 'nokogiri'
|
6
5
|
require 'pwn'
|
7
6
|
|
8
7
|
opts = {}
|
@@ -42,7 +41,7 @@ with_tor = true if opts[:with_tor]
|
|
42
41
|
with_tor ||= false
|
43
42
|
if with_tor
|
44
43
|
tor_obj = PWN::Plugins::Tor.start
|
45
|
-
proxy = "socks4://#{tor_obj[:ip]}:#{tor_obj[:port]}"
|
44
|
+
proxy = ["socks4://#{tor_obj[:ip]}:#{tor_obj[:port]}"]
|
46
45
|
end
|
47
46
|
|
48
47
|
File.new(exclude_file, 'w') unless File.exist?(exclude_file)
|
@@ -106,11 +105,29 @@ latest_tcp_results = "#{nmap_results_root}/nmap_latest_tcp_results"
|
|
106
105
|
latest_udp_results = "#{nmap_results_root}/nmap_latest_udp_results"
|
107
106
|
|
108
107
|
begin
|
108
|
+
# Per man nmap:
|
109
|
+
# The main effects of T0 are serializing the scan so only one port
|
110
|
+
# is scanned at a time, and waiting five minutes between sending
|
111
|
+
# each probe.
|
112
|
+
# T1 and T2 are similar but they only wait 15 seconds and 0.4 seconds,
|
113
|
+
# respectively, between probes.
|
114
|
+
# T3 is Nmap's default behavior, which includes parallelization.
|
115
|
+
# T4 does the equivalent of --max-rtt-timeout 1250ms --min-rtt-timeout 100ms
|
116
|
+
# --initial-rtt-timeout 500ms --max-retries 6 and sets the maximum TCP and
|
117
|
+
# SCTP scan delay to 10ms.
|
118
|
+
# T5 does the equivalent of --max-rtt-timeout 300ms --min-rtt-timeout 50ms
|
119
|
+
# --initial-rtt-timeout 250ms --max-retries 2 --host-timeout 15m
|
120
|
+
# --script-timeout 10m --max-scan-delay as well as setting the maximum TCP
|
121
|
+
# and SCTP scan delay to 5ms. Maximum UDP scan delay is not set by T4 or T5,
|
122
|
+
# but it can be set with the --max-scan-delay option.
|
123
|
+
|
109
124
|
# Target Discovery Scan
|
125
|
+
# Using -T5 template to reduce number of
|
126
|
+
# retransmission attempts on filtered ports.
|
110
127
|
PWN::Plugins::NmapIt.port_scan do |nmap|
|
111
128
|
nmap.exclude_file = exclude_file
|
112
129
|
nmap.interface = interface
|
113
|
-
nmap.
|
130
|
+
nmap.insane_timing = true
|
114
131
|
nmap.ping = true
|
115
132
|
nmap.arp_ping = true
|
116
133
|
nmap.icmp_echo_discovery = true
|
@@ -121,6 +138,7 @@ begin
|
|
121
138
|
nmap.sctp_init_ping = discovery_ports.values
|
122
139
|
nmap.output_all = latest_discovery_results
|
123
140
|
nmap.targets = ip_range
|
141
|
+
nmap.randomize_hosts = true
|
124
142
|
nmap.proxies = proxy if with_tor
|
125
143
|
end
|
126
144
|
|
@@ -135,19 +153,24 @@ begin
|
|
135
153
|
end
|
136
154
|
end
|
137
155
|
end
|
156
|
+
sorted_targets = File.readlines(target_file).sort.join
|
157
|
+
File.write(target_file, sorted_targets)
|
138
158
|
|
139
159
|
# Switch Tor Exit Node if with_tor
|
140
160
|
PWN::Plugins::Tor.switch_exit_node(tor_obj: tor_obj) if with_tor
|
141
161
|
|
142
162
|
# TCP Scan
|
163
|
+
# Using -T5 template to reduce number of
|
164
|
+
# retransmission attempts on filtered ports.
|
143
165
|
PWN::Plugins::NmapIt.port_scan do |nmap|
|
144
166
|
nmap.target_file = target_file
|
167
|
+
nmap.randomize_hosts = true
|
145
168
|
nmap.show_reason = true
|
146
169
|
nmap.exclude_file = exclude_file
|
147
170
|
nmap.interface = interface
|
148
171
|
nmap.min_host_group = 3
|
149
172
|
nmap.host_timeout = '999m'
|
150
|
-
nmap.
|
173
|
+
nmap.insane_timing = true
|
151
174
|
nmap.skip_discovery = true
|
152
175
|
nmap.syn_scan = true
|
153
176
|
nmap.default_script = true
|
@@ -166,14 +189,17 @@ begin
|
|
166
189
|
PWN::Plugins::Tor.switch_exit_node(tor_obj: tor_obj) if with_tor
|
167
190
|
|
168
191
|
# UDP Scan
|
192
|
+
# Using -T5 template to reduce number of
|
193
|
+
# retransmission attempts on filtered ports.
|
169
194
|
PWN::Plugins::NmapIt.port_scan do |nmap|
|
170
195
|
nmap.target_file = target_file
|
196
|
+
nmap.randomize_hosts = true
|
171
197
|
nmap.show_reason = true
|
172
198
|
nmap.exclude_file = exclude_file
|
173
199
|
nmap.interface = interface
|
174
200
|
nmap.min_host_group = 3
|
175
201
|
nmap.host_timeout = '999m'
|
176
|
-
nmap.
|
202
|
+
nmap.insane_timing = true
|
177
203
|
nmap.skip_discovery = true
|
178
204
|
nmap.udp_scan = true
|
179
205
|
nmap.default_script = true
|
data/lib/pwn/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pwn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.673
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
@@ -1143,7 +1143,6 @@ executables:
|
|
1143
1143
|
extensions: []
|
1144
1144
|
extra_rdoc_files: []
|
1145
1145
|
files:
|
1146
|
-
- ".each do |bytes_matched|"
|
1147
1146
|
- ".github/FUNDING.yml"
|
1148
1147
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
1149
1148
|
- ".gitignore"
|
data/.each do |bytes_matched|
DELETED
@@ -1,271 +0,0 @@
|
|
1
|
-
=> [[[31m[1;31m"[0m[31mstatic void gv_init(void) {[1;35m\n[0m[31m /* list of builtins, enable demand loading */[1;35m\n[0m[31m gvc = gvContextPlugins(lt_preloaded_symbols, DEMAND_LOADING);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
2
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m /* list of builtins, enable demand loading */[1;35m\n[0m[31m gvc = gvContextPlugins(lt_preloaded_symbols, DEMAND_LOADING);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
3
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
4
|
-
[[31m[1;31m"[0m[31mAgraph_t *graph(char *name)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!gvc)[1;35m\n[0m[31m gv_init();[1;35m\n[0m[31m return agopen(name, Agundirected, 0);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
5
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!gvc)[1;35m\n[0m[31m gv_init();[1;35m\n[0m[31m return agopen(name, Agundirected, 0);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
6
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
7
|
-
[[31m[1;31m"[0m[31mAgraph_t *digraph(char *name)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!gvc)[1;35m\n[0m[31m gv_init();[1;35m\n[0m[31m return agopen(name, Agdirected, 0);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
8
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!gvc)[1;35m\n[0m[31m gv_init();[1;35m\n[0m[31m return agopen(name, Agdirected, 0);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
9
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
10
|
-
[[31m[1;31m"[0m[31mAgraph_t *strictgraph(char *name)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!gvc)[1;35m\n[0m[31m gv_init();[1;35m\n[0m[31m return agopen(name, Agstrictundirected, 0);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
11
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!gvc)[1;35m\n[0m[31m gv_init();[1;35m\n[0m[31m return agopen(name, Agstrictundirected, 0);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
12
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
13
|
-
[[31m[1;31m"[0m[31mAgraph_t *strictdigraph(char *name)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!gvc)[1;35m\n[0m[31m gv_init();[1;35m\n[0m[31m return agopen(name, Agstrictdirected, 0);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
14
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!gvc)[1;35m\n[0m[31m gv_init();[1;35m\n[0m[31m return agopen(name, Agstrictdirected, 0);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
15
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
16
|
-
[[31m[1;31m"[0m[31mAgraph_t *readstring(char *string)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!gvc)[1;35m\n[0m[31m gv_init();[1;35m\n[0m[31m return agmemread(string);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
17
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!gvc)[1;35m\n[0m[31m gv_init();[1;35m\n[0m[31m return agmemread(string);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
18
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
19
|
-
[[31m[1;31m"[0m[31mAgraph_t *read(FILE *f)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!gvc)[1;35m\n[0m[31m gv_init();[1;35m\n[0m[31m return agread(f, NULL);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
20
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!gvc)[1;35m\n[0m[31m gv_init();[1;35m\n[0m[31m return agread(f, NULL);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
21
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
22
|
-
[[31m[1;31m"[0m[31mAgraph_t *read(const char *filename)[1;35m\n[0m[31m{[1;35m\n[0m[31m FILE *f;[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m[1;35m\n[0m[31m f = fopen(filename, [1;35m\"[0m[31mr[1;35m\"[0m[31m);[1;35m\n[0m[31m if (!f)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (!gvc)[1;35m\n[0m[31m gv_init();[1;35m\n[0m[31m g = agread(f, NULL);[1;35m\n[0m[31m fclose(f);[1;35m\n[0m[31m return g;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
23
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m FILE *f;[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m[1;35m\n[0m[31m f = fopen(filename, [1;35m\"[0m[31mr[1;35m\"[0m[31m);[1;35m\n[0m[31m if (!f)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (!gvc)[1;35m\n[0m[31m gv_init();[1;35m\n[0m[31m g = agread(f, NULL);[1;35m\n[0m[31m fclose(f);[1;35m\n[0m[31m return g;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
24
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
25
|
-
[[31m[1;31m"[0m[31mAgraph_t *graph(Agraph_t *g, char *name)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!gvc)[1;35m\n[0m[31m gv_init();[1;35m\n[0m[31m return agsubg(g, name, 1);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
26
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!gvc)[1;35m\n[0m[31m gv_init();[1;35m\n[0m[31m return agsubg(g, name, 1);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
27
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
28
|
-
[[31m[1;31m"[0m[31mAgnode_t *node(Agraph_t *g, char *name)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!gvc)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agnode(g, name, 1);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
29
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!gvc)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agnode(g, name, 1);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
30
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
31
|
-
[[31m[1;31m"[0m[31mAgedge_t *edge(Agraph_t* g, Agnode_t *t, Agnode_t *h)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!gvc || !t || !h || !g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m // edges from/to the protonode are not permitted[1;35m\n[0m[31m if (AGTYPE(t) == AGRAPH || AGTYPE(h) == AGRAPH)[1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL;[1;35m\n[0m[31m return agedge(g, t, h, NULL, 1);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
32
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!gvc || !t || !h || !g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m // edges from/to the protonode are not permitted[1;35m\n[0m[31m if (AGTYPE(t) == AGRAPH || AGTYPE(h) == AGRAPH)[1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL;[1;35m\n[0m[31m return agedge(g, t, h, NULL, 1);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
33
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
34
|
-
[[31m[1;31m"[0m[31mAgedge_t *edge(Agnode_t *t, Agnode_t *h)[1;35m\n[0m[31m{[1;35m\n[0m[31m return edge(agraphof(t), t, h);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
35
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m return edge(agraphof(t), t, h);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
36
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
37
|
-
[[31m[1;31m"[0m[31mAgedge_t *edge(char *tname, Agnode_t *h)[1;35m\n[0m[31m{[1;35m\n[0m[31m return edge(node(agraphof(h), tname), h);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
38
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m return edge(node(agraphof(h), tname), h);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
39
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
40
|
-
[[31m[1;31m"[0m[31mAgedge_t *edge(Agnode_t *t, char *hname)[1;35m\n[0m[31m{[1;35m\n[0m[31m return edge(t, node(agraphof(t), hname));[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
41
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m return edge(t, node(agraphof(t), hname));[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
42
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
43
|
-
[[31m[1;31m"[0m[31mAgedge_t *edge(Agraph_t *g, char *tname, char *hname)[1;35m\n[0m[31m{[1;35m\n[0m[31m return edge(g, node(g, tname), node(g, hname));[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
44
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m return edge(g, node(g, tname), node(g, hname));[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
45
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
46
|
-
[[31m[1;31m"[0m[31mstatic char* myagxget(void *obj, Agsym_t *a)[1;35m\n[0m[31m{[1;35m\n[0m[31m int len;[1;35m\n[0m[31m char *val, *hs;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!obj || !a)[1;35m\n[0m[31m return emptystring;[1;35m\n[0m[31m val = agxget(obj, a);[1;35m\n[0m[31m if (!val)[1;35m\n[0m[31m return emptystring;[1;35m\n[0m[31m if (a->name[0] == 'l' && strcmp(a->name, [1;35m\"[0m[31mlabel[1;35m\"[0m[31m) == 0 && aghtmlstr(val)) {[1;35m\n[0m[31m len = strlen(val);[1;35m\n[0m[31m hs = (char*)malloc(len + 3);[1;35m\n[0m[31m hs[0] = '<';[1;35m\n[0m[31m strcpy(hs+1, val);[1;35m\n[0m[31m hs[len+1] = '>';[1;35m\n[0m[31m hs[len+2] = '[1;35m\\[0m[31m0';[1;35m\n[0m[31m return hs;[1;35m\n[0m[31m }[1;35m\n[0m[31m return val;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
47
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m int len;[1;35m\n[0m[31m char *val, *hs;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!obj || !a)[1;35m\n[0m[31m return emptystring;[1;35m\n[0m[31m val = agxget(obj, a);[1;35m\n[0m[31m if (!val)[1;35m\n[0m[31m return emptystring;[1;35m\n[0m[31m if (a->name[0] == 'l' && strcmp(a->name, [1;35m\"[0m[31mlabel[1;35m\"[0m[31m) == 0 && aghtmlstr(val)) {[1;35m\n[0m[31m len = strlen(val);[1;35m\n[0m[31m hs = (char*)malloc(len + 3);[1;35m\n[0m[31m hs[0] = '<';[1;35m\n[0m[31m strcpy(hs+1, val);[1;35m\n[0m[31m hs[len+1] = '>';[1;35m\n[0m[31m hs[len+2] = '[1;35m\\[0m[31m0';[1;35m\n[0m[31m return hs;[1;35m\n[0m[31m }[1;35m\n[0m[31m return val;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
48
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
49
|
-
[[31m[1;31m"[0m[31mchar *getv(Agraph_t *g, Agsym_t *a)[1;35m\n[0m[31m{[1;35m\n[0m[31m return myagxget(g, a);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
50
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m return myagxget(g, a);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
51
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
52
|
-
[[31m[1;31m"[0m[31mchar *getv(Agraph_t *g, char *attr)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agsym_t *a;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g || !attr)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m a = agfindattr(agroot(g), attr);[1;35m\n[0m[31m return myagxget(g, a);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
53
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m Agsym_t *a;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g || !attr)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m a = agfindattr(agroot(g), attr);[1;35m\n[0m[31m return myagxget(g, a);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
54
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
55
|
-
[[31m[1;31m"[0m[31mstatic void myagxset(void *obj, Agsym_t *a, char *val)[1;35m\n[0m[31m{[1;35m\n[0m[31m int len;[1;35m\n[0m[31m char *hs;[1;35m\n[0m[31m[1;35m\n[0m[31m if (a->name[0] == 'l' && val[0] == '<' && strcmp(a->name, [1;35m\"[0m[31mlabel[1;35m\"[0m[31m) == 0) {[1;35m\n[0m[31m len = strlen(val);[1;35m\n[0m[31m if (val[len-1] == '>') {[1;35m\n[0m[31m hs = strdup(val+1);[1;35m\n[0m[31m *(hs+len-2) = '[1;35m\\[0m[31m0';[1;35m\n[0m[31m val = agstrdup_html(agraphof(obj),hs);[1;35m\n[0m[31m free(hs);[1;35m\n[0m[31m }[1;35m\n[0m[31m }[1;35m\n[0m[31m agxset(obj, a, val);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
56
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m int len;[1;35m\n[0m[31m char *hs;[1;35m\n[0m[31m[1;35m\n[0m[31m if (a->name[0] == 'l' && val[0] == '<' && strcmp(a->name, [1;35m\"[0m[31mlabel[1;35m\"[0m[31m) == 0) {[1;35m\n[0m[31m len = strlen(val);[1;35m\n[0m[31m if (val[len-1] == '>') {[1;35m\n[0m[31m hs = strdup(val+1);[1;35m\n[0m[31m *(hs+len-2) = '[1;35m\\[0m[31m0';[1;35m\n[0m[31m val = agstrdup_html(agraphof(obj),hs);[1;35m\n[0m[31m free(hs);[1;35m\n[0m[31m }[1;35m\n[0m[31m }[1;35m\n[0m[31m agxset(obj, a, val);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
57
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
58
|
-
[[31m[1;31m"[0m[31mchar *setv(Agraph_t *g, Agsym_t *a, char *val)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!g || !a || !val)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m myagxset(g, a, val);[1;35m\n[0m[31m return val;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
59
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!g || !a || !val)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m myagxset(g, a, val);[1;35m\n[0m[31m return val;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
60
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
61
|
-
[[31m[1;31m"[0m[31mchar *setv(Agraph_t *g, char *attr, char *val)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agsym_t *a;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g || !attr || !val)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m a = agfindattr(agroot(g), attr);[1;35m\n[0m[31m if (!a)[1;35m\n[0m[31m a = agraphattr(g->root, attr, emptystring);[1;35m\n[0m[31m myagxset(g, a, val);[1;35m\n[0m[31m return val;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
62
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m Agsym_t *a;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g || !attr || !val)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m a = agfindattr(agroot(g), attr);[1;35m\n[0m[31m if (!a)[1;35m\n[0m[31m a = agraphattr(g->root, attr, emptystring);[1;35m\n[0m[31m myagxset(g, a, val);[1;35m\n[0m[31m return val;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
63
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
64
|
-
[[31m[1;31m"[0m[31mchar *getv(Agnode_t *n, Agsym_t *a)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!n || !a)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(n) == AGRAPH) // protonode [1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL; // FIXME ??[1;35m\n[0m[31m return myagxget(n, a);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
65
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!n || !a)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(n) == AGRAPH) // protonode [1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL; // FIXME ??[1;35m\n[0m[31m return myagxget(n, a);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
66
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
67
|
-
[[31m[1;31m"[0m[31mchar *getv(Agnode_t *n, char *attr)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m Agsym_t *a;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!n || !attr)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(n) == AGRAPH) // protonode [1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL; // FIXME ??[1;35m\n[0m[31m g = agroot(agraphof(n));[1;35m\n[0m[31m a = agattr(g, AGNODE, attr, NULL);[1;35m\n[0m[31m return myagxget(n, a);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
68
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m Agsym_t *a;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!n || !attr)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(n) == AGRAPH) // protonode [1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL; // FIXME ??[1;35m\n[0m[31m g = agroot(agraphof(n));[1;35m\n[0m[31m a = agattr(g, AGNODE, attr, NULL);[1;35m\n[0m[31m return myagxget(n, a);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
69
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
70
|
-
[[31m[1;31m"[0m[31mchar *setv(Agnode_t *n, Agsym_t *a, char *val)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!n || !a || !val)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(n) == AGRAPH) // protonode [1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL; // FIXME ??[1;35m\n[0m[31m myagxset(n, a, val);[1;35m\n[0m[31m return val;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
71
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!n || !a || !val)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(n) == AGRAPH) // protonode [1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL; // FIXME ??[1;35m\n[0m[31m myagxset(n, a, val);[1;35m\n[0m[31m return val;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
72
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
73
|
-
[[31m[1;31m"[0m[31mchar *setv(Agnode_t *n, char *attr, char *val)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m Agsym_t *a;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!n || !attr || !val)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(n) == AGRAPH) { // protonode [1;35m\n[0m[31m[1;35m\t[0m[31mg = (Agraph_t*)n;[1;35m\n[0m[31m [1;35m\t[0m[31ma = agattr(g, AGNODE, attr, val); // create default attribute in psuodo protonode[1;35m\n[0m[31m[1;35m\t[0m[31m // FIXME? - deal with html in [1;35m\"[0m[31mlabel[1;35m\"[0m[31m attributes[1;35m\n[0m[31m[1;35m\t[0m[31mreturn val;[1;35m\n[0m[31m }[1;35m\n[0m[31m g = agroot(agraphof(n));[1;35m\n[0m[31m a = agattr(g, AGNODE, attr, NULL);[1;35m\n[0m[31m if (!a)[1;35m\n[0m[31m a = agnodeattr(g, attr, emptystring);[1;35m\n[0m[31m myagxset(n, a, val);[1;35m\n[0m[31m return val;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
74
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m Agsym_t *a;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!n || !attr || !val)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(n) == AGRAPH) { // protonode [1;35m\n[0m[31m[1;35m\t[0m[31mg = (Agraph_t*)n;[1;35m\n[0m[31m [1;35m\t[0m[31ma = agattr(g, AGNODE, attr, val); // create default attribute in psuodo protonode[1;35m\n[0m[31m[1;35m\t[0m[31m // FIXME? - deal with html in [1;35m\"[0m[31mlabel[1;35m\"[0m[31m attributes[1;35m\n[0m[31m[1;35m\t[0m[31mreturn val;[1;35m\n[0m[31m }[1;35m\n[0m[31m g = agroot(agraphof(n));[1;35m\n[0m[31m a = agattr(g, AGNODE, attr, NULL);[1;35m\n[0m[31m if (!a)[1;35m\n[0m[31m a = agnodeattr(g, attr, emptystring);[1;35m\n[0m[31m myagxset(n, a, val);[1;35m\n[0m[31m return val;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
75
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
76
|
-
[[31m[1;31m"[0m[31mchar *getv(Agedge_t *e, Agsym_t *a)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!e || !a)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(e) == AGRAPH) // protoedge [1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL; // FIXME ??[1;35m\n[0m[31m return myagxget(e, a);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
77
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!e || !a)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(e) == AGRAPH) // protoedge [1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL; // FIXME ??[1;35m\n[0m[31m return myagxget(e, a);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
78
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
79
|
-
[[31m[1;31m"[0m[31mchar *getv(Agedge_t *e, char *attr)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m Agsym_t *a;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!e || !attr)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(e) == AGRAPH) // protoedge [1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL; // FIXME ??[1;35m\n[0m[31m g = agraphof(agtail(e));[1;35m\n[0m[31m a = agattr(g, AGEDGE, attr, NULL);[1;35m\n[0m[31m return myagxget(e, a);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
80
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m Agsym_t *a;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!e || !attr)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(e) == AGRAPH) // protoedge [1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL; // FIXME ??[1;35m\n[0m[31m g = agraphof(agtail(e));[1;35m\n[0m[31m a = agattr(g, AGEDGE, attr, NULL);[1;35m\n[0m[31m return myagxget(e, a);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
81
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
82
|
-
[[31m[1;31m"[0m[31mchar *setv(Agedge_t *e, Agsym_t *a, char *val)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!e || !a || !val)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(e) == AGRAPH) // protoedge [1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL; // FIXME ??[1;35m\n[0m[31m myagxset(e, a, val);[1;35m\n[0m[31m return val;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
83
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!e || !a || !val)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(e) == AGRAPH) // protoedge [1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL; // FIXME ??[1;35m\n[0m[31m myagxset(e, a, val);[1;35m\n[0m[31m return val;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
84
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
85
|
-
[[31m[1;31m"[0m[31mchar *setv(Agedge_t *e, char *attr, char *val)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m Agsym_t *a;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!e || !attr || !val)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(e) == AGRAPH) { // protoedge [1;35m\n[0m[31m[1;35m\t[0m[31mg = (Agraph_t*)e;[1;35m\n[0m[31m [1;35m\t[0m[31ma = agattr(g, AGEDGE, attr, val); // create default attribute in pseudo protoedge[1;35m\n[0m[31m[1;35m\t[0m[31m // FIXME? - deal with html in [1;35m\"[0m[31mlabel[1;35m\"[0m[31m attributes[1;35m\n[0m[31m[1;35m\t[0m[31mreturn val;[1;35m\n[0m[31m }[1;35m\n[0m[31m g = agroot(agraphof(agtail(e)));[1;35m\n[0m[31m a = agattr(g, AGEDGE, attr, NULL);[1;35m\n[0m[31m if (!a)[1;35m\n[0m[31m a = agattr(g, AGEDGE, attr, emptystring);[1;35m\n[0m[31m myagxset(e, a, val);[1;35m\n[0m[31m return val;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
86
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m Agsym_t *a;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!e || !attr || !val)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(e) == AGRAPH) { // protoedge [1;35m\n[0m[31m[1;35m\t[0m[31mg = (Agraph_t*)e;[1;35m\n[0m[31m [1;35m\t[0m[31ma = agattr(g, AGEDGE, attr, val); // create default attribute in pseudo protoedge[1;35m\n[0m[31m[1;35m\t[0m[31m // FIXME? - deal with html in [1;35m\"[0m[31mlabel[1;35m\"[0m[31m attributes[1;35m\n[0m[31m[1;35m\t[0m[31mreturn val;[1;35m\n[0m[31m }[1;35m\n[0m[31m g = agroot(agraphof(agtail(e)));[1;35m\n[0m[31m a = agattr(g, AGEDGE, attr, NULL);[1;35m\n[0m[31m if (!a)[1;35m\n[0m[31m a = agattr(g, AGEDGE, attr, emptystring);[1;35m\n[0m[31m myagxset(e, a, val);[1;35m\n[0m[31m return val;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
87
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
88
|
-
[[31m[1;31m"[0m[31mAgraph_t *findsubg(Agraph_t *g, char *name)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!g || !name)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agsubg(g, name, 0);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
89
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!g || !name)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agsubg(g, name, 0);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
90
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
91
|
-
[[31m[1;31m"[0m[31mAgnode_t *findnode(Agraph_t *g, char *name)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!g || !name)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agnode(g, name, 0);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
92
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!g || !name)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agnode(g, name, 0);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
93
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
94
|
-
[[31m[1;31m"[0m[31mAgedge_t *findedge(Agnode_t *t, Agnode_t *h)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!t || !h)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(t) == AGRAPH || AGTYPE(h) == AGRAPH)[1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL;[1;35m\n[0m[31m return agfindedge(agraphof(t), t, h);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
95
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!t || !h)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(t) == AGRAPH || AGTYPE(h) == AGRAPH)[1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL;[1;35m\n[0m[31m return agfindedge(agraphof(t), t, h);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
96
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
97
|
-
[[31m[1;31m"[0m[31mAgsym_t *findattr(Agraph_t *g, char *name)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!g || !name)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfindattr(g, name);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
98
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!g || !name)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfindattr(g, name);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
99
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
100
|
-
[[31m[1;31m"[0m[31mAgsym_t *findattr(Agnode_t *n, char *name)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!n || !name)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfindattr(n, name);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
101
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!n || !name)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfindattr(n, name);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
102
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
103
|
-
[[31m[1;31m"[0m[31mAgsym_t *findattr(Agedge_t *e, char *name)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!e || !name)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfindattr(e, name);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
104
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!e || !name)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfindattr(e, name);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
105
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
106
|
-
[[31m[1;31m"[0m[31mAgnode_t *headof(Agedge_t *e)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(e) == AGRAPH)[1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL;[1;35m\n[0m[31m return aghead(e);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
107
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(e) == AGRAPH)[1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL;[1;35m\n[0m[31m return aghead(e);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
108
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
109
|
-
[[31m[1;31m"[0m[31mAgnode_t *tailof(Agedge_t *e)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(e) == AGRAPH)[1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL;[1;35m\n[0m[31m return agtail(e);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
110
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(e) == AGRAPH)[1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL;[1;35m\n[0m[31m return agtail(e);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
111
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
112
|
-
[[31m[1;31m"[0m[31mAgraph_t *graphof(Agraph_t *g)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!g || g == g->root)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agroot(g);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
113
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!g || g == g->root)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agroot(g);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
114
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
115
|
-
[[31m[1;31m"[0m[31mAgraph_t *graphof(Agedge_t *e)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(e) == AGRAPH)[1;35m\n[0m[31m[1;35m\t[0m[31mreturn (Agraph_t*)e; /* graph of protoedge is itself recast */[1;35m\n[0m[31m return agraphof(agtail(e));[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
116
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(e) == AGRAPH)[1;35m\n[0m[31m[1;35m\t[0m[31mreturn (Agraph_t*)e; /* graph of protoedge is itself recast */[1;35m\n[0m[31m return agraphof(agtail(e));[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
117
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
118
|
-
[[31m[1;31m"[0m[31mAgraph_t *graphof(Agnode_t *n)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(n) == AGRAPH)[1;35m\n[0m[31m[1;35m\t[0m[31mreturn (Agraph_t*)n; /* graph of protonode is itself recast */[1;35m\n[0m[31m return agraphof(n);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
119
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(n) == AGRAPH)[1;35m\n[0m[31m[1;35m\t[0m[31mreturn (Agraph_t*)n; /* graph of protonode is itself recast */[1;35m\n[0m[31m return agraphof(n);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
120
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
121
|
-
[[31m[1;31m"[0m[31mAgraph_t *rootof(Agraph_t *g)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agroot(g);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
122
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agroot(g);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
123
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
124
|
-
[[31m[1;31m"[0m[31mAgnode_t *protonode(Agraph_t *g)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return (Agnode_t *)g; // gross abuse of the type system![1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
125
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return (Agnode_t *)g; // gross abuse of the type system![1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
126
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
127
|
-
[[31m[1;31m"[0m[31mAgedge_t *protoedge(Agraph_t *g)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return (Agedge_t *)g; // gross abuse of the type system![1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
128
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return (Agedge_t *)g; // gross abuse of the type system![1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
129
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
130
|
-
[[31m[1;31m"[0m[31mchar *nameof(Agraph_t *g)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agnameof(g);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
131
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agnameof(g);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
132
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
133
|
-
[[31m[1;31m"[0m[31mchar *nameof(Agnode_t *n)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(n) == AGRAPH)[1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL;[1;35m\n[0m[31m return agnameof(n);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
134
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (AGTYPE(n) == AGRAPH)[1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL;[1;35m\n[0m[31m return agnameof(n);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
135
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
136
|
-
[[31m[1;31m"[0m[31mchar *nameof(Agsym_t *a)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!a)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return a->name;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
137
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!a)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return a->name;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
138
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
139
|
-
[[31m[1;31m"[0m[31mbool ok(Agraph_t *g)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!g) [1;35m\n[0m[31m return false;[1;35m\n[0m[31m return true;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
140
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!g) [1;35m\n[0m[31m return false;[1;35m\n[0m[31m return true;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
141
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
142
|
-
[[31m[1;31m"[0m[31mbool ok(Agnode_t *n)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!n) [1;35m\n[0m[31m return false;[1;35m\n[0m[31m return true;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
143
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!n) [1;35m\n[0m[31m return false;[1;35m\n[0m[31m return true;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
144
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
145
|
-
[[31m[1;31m"[0m[31mbool ok(Agedge_t *e)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!e) [1;35m\n[0m[31m return false;[1;35m\n[0m[31m return true;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
146
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!e) [1;35m\n[0m[31m return false;[1;35m\n[0m[31m return true;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
147
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
148
|
-
[[31m[1;31m"[0m[31mbool ok(Agsym_t *a)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!a) [1;35m\n[0m[31m return false;[1;35m\n[0m[31m return true;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
149
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!a) [1;35m\n[0m[31m return false;[1;35m\n[0m[31m return true;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
150
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
151
|
-
[[31m[1;31m"[0m[31mAgraph_t *firstsubg(Agraph_t *g)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfstsubg(g);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
152
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfstsubg(g);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
153
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
154
|
-
[[31m[1;31m"[0m[31mAgraph_t *nextsubg(Agraph_t *g, Agraph_t *sg)[1;35m\n[0m[31m{[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g || !sg)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agnxtsubg(sg);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
155
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g || !sg)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agnxtsubg(sg);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
156
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
157
|
-
[[31m[1;31m"[0m[31mAgraph_t *firstsupg(Agraph_t *g)[1;35m\n[0m[31m{[1;35m\n[0m[31m return g->parent;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m, [31m[1;31m"[0m[31m[1;35m\n[0m[31m return g->parent;[1;35m\n[0m[31m[1;31m"[0m[31m[0m, [31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
158
|
-
[[31m[1;31m"[0m[31mAgraph_t *nextsupg(Agraph_t *g, Agraph_t *sg)[1;35m\n[0m[31m{[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
159
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
160
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
161
|
-
[[31m[1;31m"[0m[31mAgedge_t *firstout(Agraph_t *g)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agnode_t *n;[1;35m\n[0m[31m Agedge_t *e;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m for (n = agfstnode(g); n; n = agnxtnode(g, n)) {[1;35m\n[0m[31m[1;35m\t[0m[31me = agfstout(g, n);[1;35m\n[0m[31m[1;35m\t[0m[31mif (e) return e;[1;35m\n[0m[31m }[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
162
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m Agnode_t *n;[1;35m\n[0m[31m Agedge_t *e;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m for (n = agfstnode(g); n; n = agnxtnode(g, n)) {[1;35m\n[0m[31m[1;35m\t[0m[31me = agfstout(g, n);[1;35m\n[0m[31m[1;35m\t[0m[31mif (e) return e;[1;35m\n[0m[31m }[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
163
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
164
|
-
[[31m[1;31m"[0m[31mAgedge_t *nextout(Agraph_t *g, Agedge_t *e)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agnode_t *n;[1;35m\n[0m[31m Agedge_t *ne;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g || !e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m ne = agnxtout(g, e);[1;35m\n[0m[31m if (ne)[1;35m\n[0m[31m return (ne);[1;35m\n[0m[31m for (n = agnxtnode(g, agtail(e)); n; n = agnxtnode(g, n)) {[1;35m\n[0m[31m[1;35m\t[0m[31mne = agfstout(g, n);[1;35m\n[0m[31m[1;35m\t[0m[31mif (ne) return ne;[1;35m\n[0m[31m }[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
165
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m Agnode_t *n;[1;35m\n[0m[31m Agedge_t *ne;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g || !e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m ne = agnxtout(g, e);[1;35m\n[0m[31m if (ne)[1;35m\n[0m[31m return (ne);[1;35m\n[0m[31m for (n = agnxtnode(g, agtail(e)); n; n = agnxtnode(g, n)) {[1;35m\n[0m[31m[1;35m\t[0m[31mne = agfstout(g, n);[1;35m\n[0m[31m[1;35m\t[0m[31mif (ne) return ne;[1;35m\n[0m[31m }[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
166
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
167
|
-
[[31m[1;31m"[0m[31mAgedge_t *firstedge(Agraph_t *g)[1;35m\n[0m[31m{[1;35m\n[0m[31m return firstout(g);[1;35m\n[0m[31m} [1;35m\n[0m[31m[1;35m\n[0m[31mAgedge_t *nextedge(Agraph_t *g, Agedge_t *e)[1;35m\n[0m[31m{[1;35m\n[0m[31m return nextout(g, e);[1;35m\n[0m[31m} [1;35m\n[0m[31m[1;35m\n[0m[31mAgedge_t *firstout(Agnode_t *n)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfstout(agraphof(n), n);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
168
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m return firstout(g);[1;35m\n[0m[31m} [1;35m\n[0m[31m[1;35m\n[0m[31mAgedge_t *nextedge(Agraph_t *g, Agedge_t *e)[1;35m\n[0m[31m{[1;35m\n[0m[31m return nextout(g, e);[1;35m\n[0m[31m} [1;35m\n[0m[31m[1;35m\n[0m[31mAgedge_t *firstout(Agnode_t *n)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfstout(agraphof(n), n);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
169
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
170
|
-
[[31m[1;31m"[0m[31mAgedge_t *nextout(Agnode_t *n, Agedge_t *e)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!n || !e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agnxtout(agraphof(n), e);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
171
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!n || !e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agnxtout(agraphof(n), e);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
172
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
173
|
-
[[31m[1;31m"[0m[31mAgnode_t *firsthead(Agnode_t *n)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agedge_t *e;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m e = agfstout(agraphof(n), n);[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return aghead(e);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
174
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m Agedge_t *e;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m e = agfstout(agraphof(n), n);[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return aghead(e);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
175
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
176
|
-
[[31m[1;31m"[0m[31mAgnode_t *nexthead(Agnode_t *n, Agnode_t *h)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agedge_t *e;[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!n || !h)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m g = agraphof(n);[1;35m\n[0m[31m e = agfindedge(g, n, h);[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m do {[1;35m\n[0m[31m e = agnxtout(g, AGMKOUT(e));[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m } while (aghead(e) == h);[1;35m\n[0m[31m return aghead(e);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
177
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m Agedge_t *e;[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!n || !h)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m g = agraphof(n);[1;35m\n[0m[31m e = agfindedge(g, n, h);[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m do {[1;35m\n[0m[31m e = agnxtout(g, AGMKOUT(e));[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m } while (aghead(e) == h);[1;35m\n[0m[31m return aghead(e);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
178
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
179
|
-
[[31m[1;31m"[0m[31mAgedge_t *firstedge(Agnode_t *n)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfstedge(agraphof(n), n);[1;35m\n[0m[31m} [1;35m\n[0m[31m[1;35m\n[0m[31mAgedge_t *nextedge(Agnode_t *n, Agedge_t *e)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!n || !e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agnxtedge(agraphof(n), e, n); [1;35m\n[0m[31m} [1;35m\n[0m[31m[1;35m\n[0m[31mAgedge_t *firstin(Agraph_t *g)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agnode_t *n;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m n = agfstnode(g);[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfstin(g, n);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
180
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfstedge(agraphof(n), n);[1;35m\n[0m[31m} [1;35m\n[0m[31m[1;35m\n[0m[31mAgedge_t *nextedge(Agnode_t *n, Agedge_t *e)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!n || !e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agnxtedge(agraphof(n), e, n); [1;35m\n[0m[31m} [1;35m\n[0m[31m[1;35m\n[0m[31mAgedge_t *firstin(Agraph_t *g)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agnode_t *n;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m n = agfstnode(g);[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfstin(g, n);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
181
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
182
|
-
[[31m[1;31m"[0m[31mAgedge_t *nextin(Agraph_t *g, Agedge_t *e)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agnode_t *n;[1;35m\n[0m[31m Agedge_t *ne;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g || !e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m ne = agnxtin(g, e);[1;35m\n[0m[31m if (ne)[1;35m\n[0m[31m return (ne);[1;35m\n[0m[31m n = agnxtnode(g, aghead(e));[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfstin(g, n);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
183
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m Agnode_t *n;[1;35m\n[0m[31m Agedge_t *ne;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g || !e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m ne = agnxtin(g, e);[1;35m\n[0m[31m if (ne)[1;35m\n[0m[31m return (ne);[1;35m\n[0m[31m n = agnxtnode(g, aghead(e));[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfstin(g, n);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
184
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
185
|
-
[[31m[1;31m"[0m[31mAgedge_t *firstin(Agnode_t *n)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfstin(agraphof(n), n);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
186
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfstin(agraphof(n), n);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
187
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
188
|
-
[[31m[1;31m"[0m[31mAgedge_t *nextin(Agnode_t *n, Agedge_t *e)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!n || !e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agnxtin(agraphof(n), e);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
189
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!n || !e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agnxtin(agraphof(n), e);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
190
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
191
|
-
[[31m[1;31m"[0m[31mAgnode_t *firsttail(Agnode_t *n)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agedge_t *e;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m e = agfstin(agraphof(n), n);[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agtail(e);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
192
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m Agedge_t *e;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m e = agfstin(agraphof(n), n);[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agtail(e);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
193
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
194
|
-
[[31m[1;31m"[0m[31mAgnode_t *nexttail(Agnode_t *n, Agnode_t *t)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agedge_t *e;[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!n || !t)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m g = agraphof(n);[1;35m\n[0m[31m e = agfindedge(g, t, n);[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m do {[1;35m\n[0m[31m e = agnxtin(g, AGMKIN(e));[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m } while (agtail(e) == t);[1;35m\n[0m[31m return agtail(e);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
195
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m Agedge_t *e;[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!n || !t)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m g = agraphof(n);[1;35m\n[0m[31m e = agfindedge(g, t, n);[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m do {[1;35m\n[0m[31m e = agnxtin(g, AGMKIN(e));[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m } while (agtail(e) == t);[1;35m\n[0m[31m return agtail(e);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
196
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
197
|
-
[[31m[1;31m"[0m[31mAgnode_t *firstnode(Agraph_t *g)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfstnode(g);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
198
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agfstnode(g);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
199
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
200
|
-
[[31m[1;31m"[0m[31mAgnode_t *nextnode(Agraph_t *g, Agnode_t *n)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!g || !n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agnxtnode(g, n);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
201
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!g || !n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agnxtnode(g, n);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
202
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
203
|
-
[[31m[1;31m"[0m[31mAgnode_t *firstnode(Agedge_t *e)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agtail(e);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
204
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return agtail(e);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
205
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
206
|
-
[[31m[1;31m"[0m[31mAgnode_t *nextnode(Agedge_t *e, Agnode_t *n)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!e || n != agtail(e))[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return aghead(e);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
207
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!e || n != agtail(e))[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m return aghead(e);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
208
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
209
|
-
[[31m[1;31m"[0m[31mAgsym_t *firstattr(Agraph_t *g)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m g = agroot(g);[1;35m\n[0m[31m return agnxtattr(g,AGRAPH,NULL);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
210
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m g = agroot(g);[1;35m\n[0m[31m return agnxtattr(g,AGRAPH,NULL);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
211
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
212
|
-
[[31m[1;31m"[0m[31mAgsym_t *nextattr(Agraph_t *g, Agsym_t *a)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!g || !a)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m g = agroot(g);[1;35m\n[0m[31m return agnxtattr(g,AGRAPH,a);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
213
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!g || !a)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m g = agroot(g);[1;35m\n[0m[31m return agnxtattr(g,AGRAPH,a);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
214
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
215
|
-
[[31m[1;31m"[0m[31mAgsym_t *firstattr(Agnode_t *n)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m g = agraphof(n);[1;35m\n[0m[31m return agnxtattr(g,AGNODE,NULL);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
216
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m g = agraphof(n);[1;35m\n[0m[31m return agnxtattr(g,AGNODE,NULL);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
217
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
218
|
-
[[31m[1;31m"[0m[31mAgsym_t *nextattr(Agnode_t *n, Agsym_t *a)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!n || !a)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m g = agraphof(n);[1;35m\n[0m[31m return agnxtattr(g,AGNODE,a);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
219
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!n || !a)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m g = agraphof(n);[1;35m\n[0m[31m return agnxtattr(g,AGNODE,a);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
220
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
221
|
-
[[31m[1;31m"[0m[31mAgsym_t *firstattr(Agedge_t *e)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m g = agraphof(agtail(e));[1;35m\n[0m[31m return agnxtattr(g,AGEDGE,NULL);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
222
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m g = agraphof(agtail(e));[1;35m\n[0m[31m return agnxtattr(g,AGEDGE,NULL);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
223
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
224
|
-
[[31m[1;31m"[0m[31mAgsym_t *nextattr(Agedge_t *e, Agsym_t *a)[1;35m\n[0m[31m{[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!e || !a)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m g = agraphof(agtail(e));[1;35m\n[0m[31m return agnxtattr(g,AGEDGE,a);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
225
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m Agraph_t *g;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!e || !a)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m g = agraphof(agtail(e));[1;35m\n[0m[31m return agnxtattr(g,AGEDGE,a);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
226
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
227
|
-
[[31m[1;31m"[0m[31mbool rm(Agraph_t *g)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m#if 0[1;35m\n[0m[31m Agraph_t* sg;[1;35m\n[0m[31m for (sg = agfstsubg (g); sg; sg = agnxtsubg (sg))[1;35m\n[0m[31m[1;35m\t[0m[31mrm(sg);[1;35m\n[0m[31m if (g == agroot(g))[1;35m\n[0m[31m[1;35m\t[0m[31magclose(g);[1;35m\n[0m[31m else[1;35m\n[0m[31m agdelete(agparent(g), g);[1;35m\n[0m[31m#endif[1;35m\n[0m[31m /* The rm function appears to have the semantics of agclose, so[1;35m\n[0m[31m * we should just do that, and let cgraph take care of all the[1;35m\n[0m[31m * details.[1;35m\n[0m[31m */[1;35m\n[0m[31m agclose(g);[1;35m\n[0m[31m return true;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
228
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m#if 0[1;35m\n[0m[31m Agraph_t* sg;[1;35m\n[0m[31m for (sg = agfstsubg (g); sg; sg = agnxtsubg (sg))[1;35m\n[0m[31m[1;35m\t[0m[31mrm(sg);[1;35m\n[0m[31m if (g == agroot(g))[1;35m\n[0m[31m[1;35m\t[0m[31magclose(g);[1;35m\n[0m[31m else[1;35m\n[0m[31m agdelete(agparent(g), g);[1;35m\n[0m[31m#endif[1;35m\n[0m[31m /* The rm function appears to have the semantics of agclose, so[1;35m\n[0m[31m * we should just do that, and let cgraph take care of all the[1;35m\n[0m[31m * details.[1;35m\n[0m[31m */[1;35m\n[0m[31m agclose(g);[1;35m\n[0m[31m return true;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
229
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
230
|
-
[[31m[1;31m"[0m[31mbool rm(Agnode_t *n)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m // removal of the protonode is not permitted[1;35m\n[0m[31m if (agnameof(n)[0] == '[1;35m\\[0m[31m001' && strcmp (agnameof(n), [1;35m\"[0m[31m[1;35m\\[0m[31m001proto[1;35m\"[0m[31m) ==0)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m agdelete(agraphof(n), n);[1;35m\n[0m[31m return true;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
231
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!n)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m // removal of the protonode is not permitted[1;35m\n[0m[31m if (agnameof(n)[0] == '[1;35m\\[0m[31m001' && strcmp (agnameof(n), [1;35m\"[0m[31m[1;35m\\[0m[31m001proto[1;35m\"[0m[31m) ==0)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m agdelete(agraphof(n), n);[1;35m\n[0m[31m return true;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
232
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
233
|
-
[[31m[1;31m"[0m[31mbool rm(Agedge_t *e)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m // removal of the protoedge is not permitted[1;35m\n[0m[31m if ((agnameof(aghead(e))[0] == '[1;35m\\[0m[31m001' && strcmp (agnameof(aghead(e)), [1;35m\"[0m[31m[1;35m\\[0m[31m001proto[1;35m\"[0m[31m) == 0)[1;35m\n[0m[31m || (agnameof(agtail(e))[0] == '[1;35m\\[0m[31m001' && strcmp (agnameof(agtail(e)), [1;35m\"[0m[31m[1;35m\\[0m[31m001proto[1;35m\"[0m[31m) == 0))[1;35m\n[0m[31m return false;[1;35m\n[0m[31m agdelete(agroot(agraphof(aghead(e))), e);[1;35m\n[0m[31m return true;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
234
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!e)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m // removal of the protoedge is not permitted[1;35m\n[0m[31m if ((agnameof(aghead(e))[0] == '[1;35m\\[0m[31m001' && strcmp (agnameof(aghead(e)), [1;35m\"[0m[31m[1;35m\\[0m[31m001proto[1;35m\"[0m[31m) == 0)[1;35m\n[0m[31m || (agnameof(agtail(e))[0] == '[1;35m\\[0m[31m001' && strcmp (agnameof(agtail(e)), [1;35m\"[0m[31m[1;35m\\[0m[31m001proto[1;35m\"[0m[31m) == 0))[1;35m\n[0m[31m return false;[1;35m\n[0m[31m agdelete(agroot(agraphof(aghead(e))), e);[1;35m\n[0m[31m return true;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
235
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
236
|
-
[[31m[1;31m"[0m[31mbool layout(Agraph_t *g, const char *engine)[1;35m\n[0m[31m{[1;35m\n[0m[31m int err;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m err = gvFreeLayout(gvc, g); /* ignore errors */[1;35m\n[0m[31m err = gvLayout(gvc, g, engine);[1;35m\n[0m[31m return (! err);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
237
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m int err;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m err = gvFreeLayout(gvc, g); /* ignore errors */[1;35m\n[0m[31m err = gvLayout(gvc, g, engine);[1;35m\n[0m[31m return (! err);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
238
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
239
|
-
[[31m[1;31m"[0m[31mbool render(Agraph_t *g)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m attach_attrs(g);[1;35m\n[0m[31m return true;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
240
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m attach_attrs(g);[1;35m\n[0m[31m return true;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
241
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
242
|
-
[[31m[1;31m"[0m[31mbool render(Agraph_t *g, const char *format)[1;35m\n[0m[31m{[1;35m\n[0m[31m int err;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m err = gvRender(gvc, g, format, stdout);[1;35m\n[0m[31m return (! err);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
243
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m int err;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m err = gvRender(gvc, g, format, stdout);[1;35m\n[0m[31m return (! err);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
244
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
245
|
-
[[31m[1;31m"[0m[31mbool render(Agraph_t *g, const char *format, FILE *f)[1;35m\n[0m[31m{[1;35m\n[0m[31m int err;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m err = gvRender(gvc, g, format, f);[1;35m\n[0m[31m return (! err);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
246
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m int err;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m err = gvRender(gvc, g, format, f);[1;35m\n[0m[31m return (! err);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
247
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
248
|
-
[[31m[1;31m"[0m[31mbool renderchannel(Agraph_t *g, const char *format, const char *channelname)[1;35m\n[0m[31m{[1;35m\n[0m[31m int err;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m gv_channel_writer_init(gvc);[1;35m\n[0m[31m err = gvRender(gvc, g, format, (FILE*)channelname);[1;35m\n[0m[31m gv_writer_reset (gvc); /* Reset to default */[1;35m\n[0m[31m return (! err);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
249
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m int err;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m gv_channel_writer_init(gvc);[1;35m\n[0m[31m err = gvRender(gvc, g, format, (FILE*)channelname);[1;35m\n[0m[31m gv_writer_reset (gvc); /* Reset to default */[1;35m\n[0m[31m return (! err);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
250
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
251
|
-
[[31m[1;31m"[0m[31mbool render(Agraph_t *g, const char *format, const char *filename)[1;35m\n[0m[31m{[1;35m\n[0m[31m int err;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m err = gvRenderFilename(gvc, g, format, filename);[1;35m\n[0m[31m return (! err);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
252
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m int err;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m err = gvRenderFilename(gvc, g, format, filename);[1;35m\n[0m[31m return (! err);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
253
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
254
|
-
[[31m[1;31m"[0m[31mchar* renderresult(Agraph_t *g, const char *format)[1;35m\n[0m[31m{[1;35m\n[0m[31m BA ba;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (!GD_alg(g))[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m ba.sz = BUFSIZ;[1;35m\n[0m[31m ba.data = (char*)malloc(ba.sz*sizeof(char)); /* must be freed by wrapper code */[1;35m\n[0m[31m ba.len = 0;[1;35m\n[0m[31m gv_string_writer_init(gvc);[1;35m\n[0m[31m (void)gvRender(gvc, g, format, (FILE*)&ba);[1;35m\n[0m[31m gv_writer_reset (gvc); /* Reset to default */[1;35m\n[0m[31m *((int*)GD_alg(g)) = ba.len;[1;35m\n[0m[31m return ba.data;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
255
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m BA ba;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m if (!GD_alg(g))[1;35m\n[0m[31m return NULL;[1;35m\n[0m[31m ba.sz = BUFSIZ;[1;35m\n[0m[31m ba.data = (char*)malloc(ba.sz*sizeof(char)); /* must be freed by wrapper code */[1;35m\n[0m[31m ba.len = 0;[1;35m\n[0m[31m gv_string_writer_init(gvc);[1;35m\n[0m[31m (void)gvRender(gvc, g, format, (FILE*)&ba);[1;35m\n[0m[31m gv_writer_reset (gvc); /* Reset to default */[1;35m\n[0m[31m *((int*)GD_alg(g)) = ba.len;[1;35m\n[0m[31m return ba.data;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
256
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
257
|
-
[[31m[1;31m"[0m[31mvoid renderresult(Agraph_t *g, const char *format, char *outdata)[1;35m\n[0m[31m{[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return;[1;35m\n[0m[31m gv_string_writer_init(gvc);[1;35m\n[0m[31m (void)gvRender(gvc, g, format, (FILE*)outdata);[1;35m\n[0m[31m gv_writer_reset (gvc); /* Reset to default */[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
258
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return;[1;35m\n[0m[31m gv_string_writer_init(gvc);[1;35m\n[0m[31m (void)gvRender(gvc, g, format, (FILE*)outdata);[1;35m\n[0m[31m gv_writer_reset (gvc); /* Reset to default */[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
259
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
260
|
-
[[31m[1;31m"[0m[31mchar* renderdata(Agraph_t *g, const char *format)[1;35m\n[0m[31m{[1;35m\n[0m[31m int err;[1;35m\n[0m[31m char *data;[1;35m\n[0m[31m unsigned int length;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL;[1;35m\n[0m[31m err = gvRenderData(gvc, g, format, &data, &length);[1;35m\n[0m[31m if (err)[1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL;[1;35m\n[0m[31m data = (char*)realloc(data, length + 1);[1;35m\n[0m[31m return data;[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
261
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m int err;[1;35m\n[0m[31m char *data;[1;35m\n[0m[31m unsigned int length;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL;[1;35m\n[0m[31m err = gvRenderData(gvc, g, format, &data, &length);[1;35m\n[0m[31m if (err)[1;35m\n[0m[31m[1;35m\t[0m[31mreturn NULL;[1;35m\n[0m[31m data = (char*)realloc(data, length + 1);[1;35m\n[0m[31m return data;[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
262
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
263
|
-
[[31m[1;31m"[0m[31mbool write(Agraph_t *g, FILE *f)[1;35m\n[0m[31m{[1;35m\n[0m[31m int err;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m err = agwrite(g, f);[1;35m\n[0m[31m return (! err);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
264
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m int err;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m err = agwrite(g, f);[1;35m\n[0m[31m return (! err);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
265
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
266
|
-
[[31m[1;31m"[0m[31mbool write(Agraph_t *g, const char *filename)[1;35m\n[0m[31m{[1;35m\n[0m[31m FILE *f;[1;35m\n[0m[31m int err;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m f = fopen(filename, [1;35m\"[0m[31mw[1;35m\"[0m[31m);[1;35m\n[0m[31m if (!f)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m err = agwrite(g, f);[1;35m\n[0m[31m fclose(f);[1;35m\n[0m[31m return (! err);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
267
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m FILE *f;[1;35m\n[0m[31m int err;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m f = fopen(filename, [1;35m\"[0m[31mw[1;35m\"[0m[31m);[1;35m\n[0m[31m if (!f)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m err = agwrite(g, f);[1;35m\n[0m[31m fclose(f);[1;35m\n[0m[31m return (! err);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
268
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m],
|
269
|
-
[[31m[1;31m"[0m[31mbool tred(Agraph_t *g)[1;35m\n[0m[31m{[1;35m\n[0m[31m int err;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m err = gvToolTred(g);[1;35m\n[0m[31m return (! err);[1;35m\n[0m[31m}[1;31m"[0m[31m[0m,
|
270
|
-
[31m[1;31m"[0m[31m[1;35m\n[0m[31m int err;[1;35m\n[0m[31m[1;35m\n[0m[31m if (!g)[1;35m\n[0m[31m return false;[1;35m\n[0m[31m err = gvToolTred(g);[1;35m\n[0m[31m return (! err);[1;35m\n[0m[31m[1;31m"[0m[31m[0m,
|
271
|
-
[31m[1;31m"[0m[31m}[1;31m"[0m[31m[0m]]
|