output.c (29d0dcddabe2e065416423a79fb2b29d6ceb6307) | output.c (aeb5d065044ee6733a7fee14edb52959a28c1ab4) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 82 unchanged lines hidden (view full) --- 91 memout.buf = NULL; 92 } 93} 94 95#endif 96 97 98void | 1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 82 unchanged lines hidden (view full) --- 91 memout.buf = NULL; 92 } 93} 94 95#endif 96 97 98void |
99outcslow(int c, struct output *file) 100{ 101 outc(c, file); 102} 103 104void |
|
99out1str(const char *p) 100{ 101 outstr(p, out1); 102} 103 104void 105out1qstr(const char *p) 106{ --- 37 unchanged lines hidden (view full) --- 144 } 145 146 inquotes = 0; 147 while ((ch = *p++) != '\0') { 148 switch (ch) { 149 case '\'': 150 /* Can't quote single quotes inside single quotes. */ 151 if (inquotes) | 105out1str(const char *p) 106{ 107 outstr(p, out1); 108} 109 110void 111out1qstr(const char *p) 112{ --- 37 unchanged lines hidden (view full) --- 150 } 151 152 inquotes = 0; 153 while ((ch = *p++) != '\0') { 154 switch (ch) { 155 case '\'': 156 /* Can't quote single quotes inside single quotes. */ 157 if (inquotes) |
152 outc('\'', file); | 158 outcslow('\'', file); |
153 inquotes = 0; 154 outstr("\\'", file); 155 break; 156 default: 157 if (!inquotes) | 159 inquotes = 0; 160 outstr("\\'", file); 161 break; 162 default: 163 if (!inquotes) |
158 outc('\'', file); | 164 outcslow('\'', file); |
159 inquotes = 1; 160 outc(ch, file); 161 } 162 } 163 if (inquotes) | 165 inquotes = 1; 166 outc(ch, file); 167 } 168 } 169 if (inquotes) |
164 outc('\'', file); | 170 outcslow('\'', file); |
165} 166 167void 168outbin(const void *data, size_t len, struct output *file) 169{ 170 const char *p; 171 172 p = data; --- 170 unchanged lines hidden --- | 171} 172 173void 174outbin(const void *data, size_t len, struct output *file) 175{ 176 const char *p; 177 178 p = data; --- 170 unchanged lines hidden --- |