| 326 | } |
| 327 | |
| 328 | static void ps (struct ide_hdf *ide, int offset, const TCHAR *src, int max) |
| 329 | { |
| 330 | int i, len; |
| 331 | char *s; |
| 332 | |
| 333 | s = ua(src); |
| 334 | len = uaestrlen(s); |
| 335 | for (i = 0; i < max; i += 2) { |
| 336 | char c1 = ' '; |
| 337 | if (i < len) |
| 338 | c1 = s[i]; |
| 339 | char c2 = ' '; |
| 340 | if (i + 1 < len) |
| 341 | c2 = s[i + 1]; |
| 342 | uae_u16 w = (c1 << 0) | (c2 << 8); |
| 343 | if (ide->byteswap) { |
| 344 | w = (w >> 8) | (w << 8); |
| 345 | } |
| 346 | ide->secbuf[offset * 2 + 0] = w >> 8; |
| 347 | ide->secbuf[offset * 2 + 1] = w >> 0; |
| 348 | offset++; |
| 349 | } |
| 350 | xfree (s); |
| 351 | } |
| 352 | |
| 353 | bool ide_isdrive (struct ide_hdf *ide) |
| 354 | { |
no test coverage detected