| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: debug.c,v 1.4 2021/02/23 14:59:09 christos Exp $ */ | | 1 | /* $NetBSD: debug.c,v 1.5 2021/02/24 02:33:56 christos Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1993 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1993 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -171,41 +171,41 @@ s_print(struct re_guts *g, FILE *d) | | | @@ -171,41 +171,41 @@ s_print(struct re_guts *g, FILE *d) |
171 | case O_QUEST: | | 171 | case O_QUEST: |
172 | if (OP(*(s-opnd)) != OQUEST_) | | 172 | if (OP(*(s-opnd)) != OQUEST_) |
173 | fprintf(d, "<%ld>", (long)opnd); | | 173 | fprintf(d, "<%ld>", (long)opnd); |
174 | fprintf(d, "?)"); | | 174 | fprintf(d, "?)"); |
175 | break; | | 175 | break; |
176 | case OLPAREN: | | 176 | case OLPAREN: |
177 | fprintf(d, "((<%ld>", (long)opnd); | | 177 | fprintf(d, "((<%ld>", (long)opnd); |
178 | break; | | 178 | break; |
179 | case ORPAREN: | | 179 | case ORPAREN: |
180 | fprintf(d, "<%ld>))", (long)opnd); | | 180 | fprintf(d, "<%ld>))", (long)opnd); |
181 | break; | | 181 | break; |
182 | case OCH_: | | 182 | case OCH_: |
183 | fprintf(d, "<"); | | 183 | fprintf(d, "<"); |
184 | if (OP(*(s+opnd)) != OOR2) | | 184 | if (OP(*(s+opnd)) != (sop)OOR2) |
185 | fprintf(d, "<%ld>", (long)opnd); | | 185 | fprintf(d, "<%ld>", (long)opnd); |
186 | break; | | 186 | break; |
187 | case OOR1: | | 187 | case OOR1: |
188 | if (OP(*(s-opnd)) != OOR1 && OP(*(s-opnd)) != OCH_) | | 188 | if (OP(*(s-opnd)) != (sop)OOR1 && OP(*(s-opnd)) != (sop)OCH_) |
189 | fprintf(d, "<%ld>", (long)opnd); | | 189 | fprintf(d, "<%ld>", (long)opnd); |
190 | fprintf(d, "|"); | | 190 | fprintf(d, "|"); |
191 | break; | | 191 | break; |
192 | case OOR2: | | 192 | case OOR2: |
193 | fprintf(d, "|"); | | 193 | fprintf(d, "|"); |
194 | if (OP(*(s+opnd)) != OOR2 && OP(*(s+opnd)) != O_CH) | | 194 | if (OP(*(s+opnd)) != (sop)OOR2 && OP(*(s+opnd)) != (sop)O_CH) |
195 | fprintf(d, "<%ld>", (long)opnd); | | 195 | fprintf(d, "<%ld>", (long)opnd); |
196 | break; | | 196 | break; |
197 | case O_CH: | | 197 | case O_CH: |
198 | if (OP(*(s-opnd)) != OOR1) | | 198 | if (OP(*(s-opnd)) != (sop)OOR1) |
199 | fprintf(d, "<%ld>", (long)opnd); | | 199 | fprintf(d, "<%ld>", (long)opnd); |
200 | fprintf(d, ">"); | | 200 | fprintf(d, ">"); |
201 | break; | | 201 | break; |
202 | default: | | 202 | default: |
203 | fprintf(d, "!%ld(%ld)!", (long)OP(*s), (long)opnd); | | 203 | fprintf(d, "!%ld(%ld)!", (long)OP(*s), (long)opnd); |
204 | break; | | 204 | break; |
205 | } | | 205 | } |
206 | if (!done) | | 206 | if (!done) |
207 | GAP(); | | 207 | GAP(); |
208 | } | | 208 | } |
209 | } | | 209 | } |
210 | | | 210 | |
211 | /* | | 211 | /* |