Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/libbb/printable.c
- Timestamp:
- Dec 20, 2016, 4:07:32 PM (7 years ago)
- Location:
- branches/3.3
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi-busybox/libbb/printable.c
r2725 r3621 33 33 fputc(ch, file); 34 34 } 35 36 void FAST_FUNC visible(unsigned ch, char *buf, int flags) 37 { 38 if (ch == '\t' && !(flags & VISIBLE_SHOW_TABS)) { 39 goto raw; 40 } 41 if (ch == '\n') { 42 if (flags & VISIBLE_ENDLINE) 43 *buf++ = '$'; 44 } else { 45 if (ch >= 128) { 46 ch -= 128; 47 *buf++ = 'M'; 48 *buf++ = '-'; 49 } 50 if (ch < 32 || ch == 127) { 51 *buf++ = '^'; 52 ch ^= 0x40; 53 } 54 } 55 raw: 56 *buf++ = ch; 57 *buf = '\0'; 58 }
Note:
See TracChangeset
for help on using the changeset viewer.