Changeset 1195 for toilet/trunk/src/render.c
- Timestamp:
- Oct 10, 2006, 9:15:28 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
toilet/trunk/src/render.c
r1194 r1195 49 49 static int feed_tiny(context_t *cx, uint32_t ch) 50 50 { 51 switch(ch) 52 { 53 case (uint32_t)'\r': 54 return 0; 55 case (uint32_t)'\n': 56 cx->x = 0; 57 cx->y++; 58 return 0; 59 case (uint32_t)'\t': 60 cx->x = (cx->x & ~7) + 8; 61 return 0; 62 } 63 51 64 /* Check whether we reached the end of the screen */ 52 65 if(cx->x && cx->x + 1 > cx->term_width) … … 73 86 cucul_set_canvas_size(cx->cv, cx->ew, cx->eh); 74 87 75 switch(ch) 76 { 77 case (uint32_t)'\r': 78 return 0; 79 case (uint32_t)'\n': 80 cx->x = 0; 81 cx->y++; 82 break; 83 case (uint32_t)'\t': 84 cx->x = (cx->x & ~7) + 8; 85 break; 86 default: 87 cucul_putchar(cx->cv, cx->x, cx->y, ch); 88 cx->x++; 89 break; 90 } 88 cucul_putchar(cx->cv, cx->x, cx->y, ch); 89 cx->x++; 91 90 92 91 return 0; … … 126 125 unsigned int h = cucul_get_font_height(cx->f); 127 126 unsigned int x, y; 127 128 switch(ch) 129 { 130 case (uint32_t)'\r': 131 return 0; 132 case (uint32_t)'\n': 133 cx->x = 0; 134 cx->y += h; 135 return 0; 136 case (uint32_t)'\t': 137 cx->x = (((cx->x / w) & ~7) + 8) * w; 138 return 0; 139 } 128 140 129 141 /* Check whether we reached the end of the screen */
Note: See TracChangeset
for help on using the changeset viewer.