| 38 | } |
| 39 | |
| 40 | static void stdcbf(void *cb, char *buf, int inbuf){ |
| 41 | int delay = 0; |
| 42 | int i; |
| 43 | |
| 44 | for(i = 0; i < inbuf; i++){ |
| 45 | switch(buf[i]){ |
| 46 | case '&': |
| 47 | if(delay){ |
| 48 | stdpr((struct printparam*)cb, buf+i-delay, delay); |
| 49 | delay = 0; |
| 50 | } |
| 51 | stdpr((struct printparam*)cb, "&", 5); |
| 52 | break; |
| 53 | case '<': |
| 54 | if(delay){ |
| 55 | stdpr((struct printparam*)cb, buf+i-delay, delay); |
| 56 | delay = 0; |
| 57 | } |
| 58 | stdpr((struct printparam*)cb, "<", 4); |
| 59 | break; |
| 60 | case '>': |
| 61 | if(delay){ |
| 62 | stdpr((struct printparam*)cb, buf+i-delay, delay); |
| 63 | delay = 0; |
| 64 | } |
| 65 | stdpr((struct printparam*)cb, ">", 4); |
| 66 | break; |
| 67 | default: |
| 68 | delay++; |
| 69 | break; |
| 70 | } |
| 71 | } |
| 72 | if(delay){ |
| 73 | stdpr((struct printparam*)cb, buf+i-delay, delay); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | /* |
| 78 | static char * templateprint(struct printparam* pp, int *level, struct dictionary *dict, char * template){ |