Lines Matching refs:used
20 int used = 0;
23 if (dest_len - used < 2) // Need space for two letter escape
28 case '\n': dest[used++] = '\\'; dest[used++] = 'n'; break;
29 case '\r': dest[used++] = '\\'; dest[used++] = 'r'; break;
30 case '\t': dest[used++] = '\\'; dest[used++] = 't'; break;
31 case '\"': dest[used++] = '\\'; dest[used++] = '\"'; break;
32 case '\'': dest[used++] = '\\'; dest[used++] = '\''; break;
33 case '\\': dest[used++] = '\\'; dest[used++] = '\\'; break;
39 if (dest_len - used < 4) // need space for 4 letter escape
41 sprintf(dest + used, "\\%03o", c);
42 used += 4;
44 dest[used++] = c; break;
49 if (dest_len - used < 1) // make sure that there is room for \0
52 dest[used] = '\0'; // doesn't count towards return value though
53 return used;