MCPcopy Index your code
hub / github.com/3proxy/3proxy / stdcbf

Function stdcbf

src/webadmin.c:40–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40static 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, "&amp;", 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, "&lt;", 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, "&gt;", 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/*
78static char * templateprint(struct printparam* pp, int *level, struct dictionary *dict, char * template){

Callers

nothing calls this directly

Calls 1

stdprFunction · 0.85

Tested by

no test coverage detected