MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / cicada_get_line

Function cicada_get_line

framework/data_source/dataSourceIO.cpp:51–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 }
50
51 static int cicada_get_line(AVIOContext *s, char *buf, int maxlen)
52 {
53 int i = 0;
54 char c;
55
56 do {
57 c = (char) avio_r8(s);
58
59 if (c && i < maxlen - 1) {
60 buf[i++] = c;
61 }
62 } while (c != '\n' && c != '\r' && c);
63
64 if (c == '\r' && avio_r8(s) != '\n' && !avio_feof(s)) {
65 avio_skip(s, -1);
66 }
67
68 buf[i] = 0;
69 return i;
70 }
71
72 int dataSourceIO::get_line(char *buf, int maxlen)
73 {

Callers 1

get_lineMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected