Lines Matching refs:token

27 esci2_parse_block(char *buf, int len, void *userdata, SANE_Status (*cb)(void *userdata, char *token, int len))
65 /* find the end of the token */
132 void *userdata, SANE_Status (*cb)(void *userdata, char *token, int len))
156 /* pointer to the token's value */
234 static SANE_Status esci2_cmd_simple(epsonds_scanner* s, char *cmd, SANE_Status (*cb)(void *userdata, char *token, int len))
331 static void debug_token(int level, const char *func, char *token, int len)
334 memcpy(tdata, token + 3, len);
337 DBG(level, "%s: %3.3s / %s / %d\n", func, token, tdata, len);
342 static SANE_Status info_cb(void *userdata, char *token, int len)
348 /* pointer to the token's value */
349 value = token + 3;
353 if (strncmp("nrd", token, 3) == 0) {
359 if (strncmp("PRD", token, 3) == 0) {
366 if (strncmp("VER", token, 3) == 0) {
372 if (strncmp("S/N", token, 3) == 0) {
378 if (strncmp("ADF", token, 3) == 0) {
525 if (strncmp("FB ", token, 3) == 0) {
636 static SANE_Status capa_cb(void *userdata, char *token, int len)
640 char *value = token + 3;
643 debug_token(DBG_LEVEL, __func__, token, len);
648 if (strncmp("ADFDPLX", token, 3 + 4) == 0) {
653 if (strncmp("ADFSKEW", token, 3 + 4) == 0) {
658 if (strncmp("ADFOVSN", token, 3 + 4) == 0) {
662 if (strncmp("ADFPEDT", token, 3 + 4) == 0) {
666 if (strncmp("ADFLOAD", token, 3 + 4) == 0) {
671 if (strncmp("ADFEJCT", token, 3 + 4) == 0) {
676 if (strncmp("ADFCRP ", token, 3 + 4) == 0) {
681 if (strncmp("ADFFAST", token, 3 + 4) == 0) {
685 if (strncmp("ADFDFL1", token, 3 + 4) == 0) {
691 if (len == 8 && strncmp("ADFDFL1DFL2", token, 3 + 4) == 0) {
696 if (strncmp("FMT", token, 3) == 0) {
714 if (strncmp("COLLIST", token, 3 + 4) == 0)
716 char *p = token + 3 + 4;
732 if (strncmp("RSMRANG", token, 3 + 4) == 0) {
734 char *p = token + 3 + 4;
749 if (strncmp("RSMLIST", token, 3 + 4) == 0) {
751 char *p = token + 3 + 4;
783 static SANE_Status stat_cb(void *userdata, char *token, int len)
785 char *value = token + 3;
790 debug_token(DBG_LEVEL, __func__, token, len);
793 if (strncmp("ERR", token, 3) == 0) {
815 static SANE_Status resa_cb(void *userdata, char *token, int len)
822 debug_token(DBG_LEVEL, __func__, token, len);
835 static SANE_Status para_cb(void *userdata, char *token, int len)
838 debug_token(DBG_LEVEL, __func__, token, len);
843 if (strncmp("par", token, 3) == 0) {
844 if (strncmp("FAIL", token + 3, 4) == 0) {
871 static SANE_Status img_cb(void *userdata, char *token, int len)
876 debug_token(DBG_LEVEL, __func__, token, len);
882 if (len == 24 && strncmp("pst", token, 3) == 0) {
884 s->dummy = decode_value(token + 3 + 8, 8);
888 decode_value(token + 3, 8),
889 decode_value(token + 3 + 8 + 8, 8),
895 if (len == 12 && strncmp("pst", token, 3) == 0) {
897 s->dummy = decode_value(token + 3 + 4, 4);
901 decode_value(token + 3, 4),
902 decode_value(token + 3 + 4 + 4, 4),
908 if (len == 16 && strncmp("pst", token, 3) == 0) {
910 s->dummy = decode_value(token + 3 + 4, 4);
914 decode_value(token + 3, 4),
915 decode_value(token + 3 + 4 + 4, 8),
921 if (len == 20 && strncmp("pst", token, 3) == 0) {
923 s->dummy = decode_value(token + 3 + 8, 4);
927 decode_value(token + 3, 8),
928 decode_value(token + 3 + 8 + 4, 8),
936 if (len == 16 && strncmp("pen", token, 3) == 0) {
945 decode_value(token + 3, 8),
946 decode_value(token + 3 + 8, 8),
948 s->width_temp = decode_value(token + 3, 8);
949 s->height_temp = decode_value(token + 3 + 8, 8);
954 if (len == 12 && strncmp("pen", token, 3) == 0) {
964 decode_value(token + 3, 4),
965 decode_value(token + 3 + 4, 8),
968 s->width_temp = decode_value(token + 3, 4);
969 s->height_temp = decode_value(token + 3 + 4, 8);
974 if (len == 8 && strncmp("pen", token, 3) == 0) {
983 decode_value(token + 3, 4),
984 decode_value(token + 3 + 4, 4),
987 s->width_temp = decode_value(token + 3, 4);
988 s->height_temp = decode_value(token + 3 + 4, 4);
995 if (len == 4 && strncmp("typ", token, 3) == 0) {
997 if (token[6] == 'B')
1005 if (strncmp("err", token, 3) == 0) {
1007 char *option = token + 3; /* ADF, TPU, FB */
1008 char *cause = token + 3 + 4; /* OPN, PJ, PE, ERR, LTF, LOCK, DFED, DTCL, AUT, PERM */
1028 if (len == 4 && strncmp("atnCAN ", token, 3 + 4) == 0) {
1035 if (len == 4 && strncmp("lftd000", token, 3 + 4) == 0) {