| 147 | #endif |
| 148 | |
| 149 | static int |
| 150 | print_addr(const char *name, const char *addr, int width) |
| 151 | { |
| 152 | char buf[128]; |
| 153 | int protrusion; |
| 154 | |
| 155 | if (width < 0) { |
| 156 | snprintf(buf, sizeof(buf), "{:%s/%%s} ", name); |
| 157 | xo_emit(buf, addr); |
| 158 | protrusion = 0; |
| 159 | } else { |
| 160 | if (Wflag != 0 || numeric_addr) { |
| 161 | snprintf(buf, sizeof(buf), "{[:%d}{:%s/%%s}{]:} ", |
| 162 | -width, name); |
| 163 | xo_emit(buf, addr); |
| 164 | protrusion = strlen(addr) - width; |
| 165 | if (protrusion < 0) |
| 166 | protrusion = 0; |
| 167 | } else { |
| 168 | snprintf(buf, sizeof(buf), "{[:%d}{:%s/%%-.*s}{]:} ", |
| 169 | -width, name); |
| 170 | xo_emit(buf, width, addr); |
| 171 | protrusion = 0; |
| 172 | } |
| 173 | } |
| 174 | return (protrusion); |
| 175 | } |
| 176 | |
| 177 | |
| 178 | static void |
no test coverage detected