s 310 core/gps.c int s = (int)rest; s 311 core/gps.c int hour = s / 3600; s 312 core/gps.c s = s % 3600; s 313 core/gps.c int minute = s / 60; s 314 core/gps.c s = s % 60; s 315 core/gps.c int second = s; s 908 core/gps.c int s = (int)time_to_end; s 909 core/gps.c int minute = s / 60; s 910 core/gps.c s = s % 60; s 911 core/gps.c int second = s; s 291 core/gps_math.c rcb->s = 0.0; s 319 core/gps_math.c rcb->s = 0.0; s 330 core/gps_math.c rcb->s = 0.0; s 355 core/gps_math.c rcb->s = (rcb->n * rcb->sxy - rcb->sx * rcb->sy ) / det; s 366 core/gps_math.c return rcb->last_x * rcb->s + rcb->t; s 375 core/gps_math.c return x * rcb->s + rcb->t; s 384 core/gps_math.c return rcb->s != 0.0 ? (y - rcb->t) / rcb->s : 1e9; s 393 core/gps_math.c return rcb->s; s 429 core/gps_math.c double s = _sin (arg); s 430 core/gps_math.c return sqrt (1.0 - s*s); s 70 core/gps_math.h double s; s 1416 core/gui.c int h, m, s; s 1419 core/gui.c s = *v % 60; s 1425 core/gui.c s += change; s 1426 core/gui.c if (s < 0) s = 59; s 1427 core/gui.c if (s > 59) s = 0; s 1441 core/gui.c *v = (h * 3600) + (m * 60) + s; s 1443 core/gui.c sprintf(buf, "%1d:%02d:%02d", h, m, s); s 1231 core/gui_draw.c int draw_string_clipped(coord x, coord y, const char *s, twoColors cl, int max_width) s 1233 core/gui_draw.c while (*s && (*s != '\n') && (max_width >= FONT_WIDTH)) s 1235 core/gui_draw.c draw_char(x, y, *s, cl); s 1236 core/gui_draw.c s++; s 1239 core/gui_draw.c if ((x>=camera_screen.width) && (*s)) s 1249 core/gui_draw.c int draw_string(coord x, coord y, const char *s, twoColors cl) s 1251 core/gui_draw.c return draw_string_clipped(x, y, s, cl, camera_screen.width); s 1259 core/gui_draw.c int draw_string_justified(coord x, coord y, const char *s, twoColors cl, int xo, int max_width, int justification) s 1262 core/gui_draw.c const char *e = strchr(s, '\n'); s 1265 core/gui_draw.c l = (e - s) * FONT_WIDTH; s 1267 core/gui_draw.c l = strlen(s) * FONT_WIDTH; s 1286 core/gui_draw.c l = draw_string_clipped(x+xo, y, s, cl, max_width - xo) - x; s 1301 core/gui_draw.c int text_dimensions(const char *s, int width, int max_chars, int *max_lines) s 1304 core/gui_draw.c while (s && *s && (l < *max_lines)) s 1306 core/gui_draw.c const char *e = strchr(s, '\n'); s 1309 core/gui_draw.c n = e - s; s 1314 core/gui_draw.c n = strlen(s); s 1319 core/gui_draw.c s = e; s 1332 core/gui_draw.c int draw_text_justified(coord x, coord y, const char *s, twoColors cl, int max_chars, int max_lines, int justification) s 1335 core/gui_draw.c while (s && *s && (max_lines > 0)) s 1337 core/gui_draw.c const char *e = strchr(s, '\n'); s 1340 core/gui_draw.c rx = draw_string_justified(x, y, s, cl, 0, max_chars*FONT_WIDTH, justification); s 1342 core/gui_draw.c s = e; s 1351 core/gui_draw.c void draw_string_scaled(coord x, coord y, const char *s, twoColors cl, int xsize, int ysize) s 1353 core/gui_draw.c while (*s && (*s != '\n')) s 1355 core/gui_draw.c draw_char_scaled(x, y, *s, cl, xsize, ysize); s 1356 core/gui_draw.c s++; s 1358 core/gui_draw.c if ((x>=camera_screen.width) && (*s)) s 1368 core/gui_draw.c void draw_string_scaled(coord x, coord y, const char *s, twoColors cl, int xsize, int ysize) s 1372 core/gui_draw.c while (*s && (*s != '\n')) s 1374 core/gui_draw.c draw_char_unscaled(x, y, *s, cl); s 1375 core/gui_draw.c s++; s 1377 core/gui_draw.c if ((x>=camera_screen.width) && (*s)) s 1386 core/gui_draw.c while (*s && (*s != '\n')) s 1388 core/gui_draw.c draw_char_scaled(x, y, *s, cl, xsize, ysize); s 1389 core/gui_draw.c s++; s 1391 core/gui_draw.c if ((x>=camera_screen.width) && (*s)) s 1403 core/gui_draw.c void draw_osd_string(OSD_pos pos, int xo, int yo, char *s, twoColors c, OSD_scale scale) s 1406 core/gui_draw.c draw_string(pos.x+xo, pos.y+yo, s, c); s 1408 core/gui_draw.c draw_string_scaled(pos.x+(xo*scale.x), pos.y+(yo*scale.y), s, c, scale.x, scale.y); s 1413 core/gui_draw.c void draw_osd_string(OSD_pos pos, int xo, int yo, char *s, twoColors c, OSD_scale scale) s 1417 core/gui_draw.c draw_string(pos.x+xo, pos.y+yo, s, c); s 1421 core/gui_draw.c draw_string_scaled(pos.x+(xo>>1), pos.y+(yo>>1), s, c, scale.x, scale.y); s 1425 core/gui_draw.c draw_string_scaled(pos.x+(xo*scale.x), pos.y+(yo*scale.y), s, c, scale.x, scale.y); s 124 core/gui_draw.h extern int text_dimensions(const char *s, int width, int max_chars, int *max_lines); s 126 core/gui_draw.h extern int draw_string_clipped(coord x, coord y, const char *s, twoColors cl, int max_width); s 127 core/gui_draw.h extern int draw_string(coord x, coord y, const char *s, twoColors cl); s 128 core/gui_draw.h extern int draw_string_justified(coord x, coord y, const char *s, twoColors cl, int xo, int max_width, int justification); s 129 core/gui_draw.h extern int draw_text_justified(coord x, coord y, const char *s, twoColors cl, int max_chars, int max_lines, int justification); s 130 core/gui_draw.h extern void draw_string_scaled(coord x, coord y, const char *s, twoColors cl, int xsize, int ysize); s 131 core/gui_draw.h extern void draw_osd_string(OSD_pos pos, int xo, int yo, char *s, twoColors c, OSD_scale scale); s 631 core/gui_osd.c static char *s[6] = {" ", "1/6", "1/3", "1/2", "2/3", "5/6"}; s 638 core/gui_osd.c sprintf(osd_buf, "EV: %d %s", abs(ev/96), s[abs(ev/16%6)]); s 640 core/gui_osd.c sprintf(osd_buf, "EV: %s ", s[abs(ev/16%6)]); s 1225 core/gui_osd.c char s[30]; s 1240 core/gui_osd.c if (len>=(int)sizeof(s)) count=sizeof(s)-1; else count=len; s 1241 core/gui_osd.c get_parameter_data(p, &s, count); s 1242 core/gui_osd.c s[count]=0; s 1243 core/gui_osd.c sprintf(osd_buf, "%3d: %30s :%2d ", p, s,len); s 298 core/gui_script.c const char *s = p->option_buf; s 300 core/gui_script.c while (*s) s 302 core/gui_script.c s = skip_whitespace(skip_token(s)); s 308 core/gui_script.c s = p->option_buf; s 310 core/gui_script.c while (*s) s 312 core/gui_script.c p->options[cnt] = s; s 313 core/gui_script.c s = skip_token(s); s 314 core/gui_script.c if (*s) s 316 core/gui_script.c *((char*)s) = 0; s 317 core/gui_script.c s = skip_whitespace(s+1); s 350 core/gui_script.c const char *s = skip_tochar(ptr+1, *ptr); s 351 core/gui_script.c p->desc = malloc(s-ptr); s 352 core/gui_script.c strncpy(p->desc, ptr+1, s-ptr-1); s 353 core/gui_script.c p->desc[s-ptr-1] = 0; s 354 core/gui_script.c if (*s == *ptr) s++; s 355 core/gui_script.c ptr = skip_whitespace(s); s 506 core/gui_script.c char* s = tgt_buf + strlen(tgt_buf); s 507 core/gui_script.c strncpy(s, name, 12); s 508 core/gui_script.c s[12] = 0; s 511 core/gui_script.c s = strrchr(tgt_buf, '.'); s 512 core/gui_script.c if (!s) s = tgt_buf + strlen(tgt_buf); s 517 core/gui_script.c strcpy(s,".cfg"); s 520 core/gui_script.c sprintf(s,"_%d", conf.script_param_set); s 523 core/gui_script.c sprintf(s,".%d", conf.script_param_set); s 183 core/lib_thumb.c char *strpbrk(const char *s, const char *accept) s 187 core/lib_thumb.c for (sc1 = s; *sc1 != '\0'; ++sc1) s 213 core/lib_thumb.c void *memchr(const void *s, int c, int n) s 217 core/lib_thumb.c if (*(char *)s == c) s 218 core/lib_thumb.c return (void *)s; s 219 core/lib_thumb.c s++; s 253 core/ptp.c static int send_ptp_data_buffered(ptp_data *data, void * (*copy_fn)(void *d, const void *s, long sz), const char *src, int size) s 544 core/ptp.c int s = data->get_data_size(data->handle); s 545 core/ptp.c if (s <= 0 || (s&3)) // no data or not an integer number of args s 550 core/ptp.c unsigned *buf = malloc(s); s 558 core/ptp.c if ( recv_ptp_data(data,(char *) buf,s) ) s 561 core/ptp.c ptp.param1 = call_func_ptr((void *)buf[0],(unsigned *)buf+1,(s-4)/4); s 573 core/ptp.c const char *s = NULL; s 584 core/ptp.c s = temp_data.str; s 588 core/ptp.c if ( !send_ptp_data(data,s,l) ) s 756 core/ptp.c int s; s 762 core/ptp.c s = data->get_data_size(data->handle); s 766 core/ptp.c flush_recv_ptp_data(data,s); s 771 core/ptp.c buf = (char *) malloc(s); s 778 core/ptp.c recv_ptp_data(data,buf,s); s 1160 core/shooting.c int shooting_get_near_limit_f(int s, int av, int fl) s 1164 core/shooting.c double m = ((double)(h_1e3 - fl)+500)/1000*s; s 1165 core/shooting.c int v = ((h_1e3 - 2*fl + 1000*s)+500)/1000; s 1170 core/shooting.c int shooting_get_far_limit_f(int s, int av, int fl) s 1174 core/shooting.c double m = ((double)(h_1e3 - fl)+500)/1000*s; s 1175 core/shooting.c int v = ((h_1e3 - 1000*s)+500)/1000; s 1413 core/shooting.c int s=v; s 1420 core/shooting.c s=shooting_get_near_limit_f(v,shooting_get_min_real_aperture(),get_focal_length(lens_get_zoom_point())); s 1422 core/shooting.c if (!conf.dof_use_exif_subj_dist && (s != (int)INFINITY_DIST)) s 1423 core/shooting.c s+=shooting_get_lens_to_focal_plane_width(); s 1424 core/shooting.c lens_set_focus_pos(s); s 57 core/suba.c #define ALIGN(s) (((s) + ALIGNMASK) & ~ALIGNMASK) s 82 core/suba.c #define check_cell(s, c, f, l) (c) s 9 core/versions.c static const char* get_val(const char *s, short *v) s 11 core/versions.c if (s && *s) s 13 core/versions.c *v = strtol(s, (char**)&s, 0); s 14 core/versions.c if (s && (*s == '.')) s++; s 16 core/versions.c return s; s 29 include/debug.h #define DOPEN(s) debug_open(s) s 31 include/debug.h #define DLOG_STR(s) debug_print(s) s 32 include/debug.h #define DLOG_INT(s,v) debug_print_int(s,v) s 33 include/debug.h #define DLOG_FLOAT(s,v) debug_print_float(s,v) s 36 include/debug.h #define DOPEN(s) s 38 include/debug.h #define DLOG_STR(s) s 39 include/debug.h #define DLOG_INT(s,v) s 40 include/debug.h #define DLOG_FLOAT(s,v) s 45 include/debug.h #define PROFILER(s) debug_profiler(__FILE__, __LINE__, __FUNCTION__, s) s 46 include/debug.h #define PROFILERSTR(s) debug_profiler_print(s) s 50 include/debug.h #define PROFILER(s) s 51 include/debug.h #define PROFILERSTR(s) s 41 include/font.h extern void rbf_enable_cursor(int s, int e); s 120 include/lolevel.h extern long _strlen(const char *s); s 123 include/lolevel.h extern char *_strchr(const char *s, int c); s 127 include/lolevel.h extern char *_strrchr(const char *s, int c); s 128 include/lolevel.h extern char *_strpbrk(const char *s, const char *accept); s 153 include/lolevel.h extern void *_memchr(const void *s, int c, int n); s 155 include/lolevel.h extern void *_memset(void *s, int c, int n); s 259 include/lolevel.h extern long _strftime(char *s, unsigned long maxsize, const char *format, const /*struct tm*/ void *timp); s 16 include/std/stdlib.h extern long sprintf(char *s, const char *st, ...); s 11 include/std/string.h extern long strlen(const char *s); s 14 include/std/string.h extern char *strchr(const char *s, int c); s 18 include/std/string.h extern char *strrchr(const char *s, int c); s 19 include/std/string.h extern char *strpbrk(const char *s, const char *accept); s 20 include/std/string.h extern char *strstr(const char *s, const char *s2); s 23 include/std/string.h extern void *memset(void *s, int c, int n); s 25 include/std/string.h extern void *memchr(const void *s, int c, int n); s 35 include/std/time.h extern long strftime(char *s, unsigned long maxsize, const char *format, const struct tm *timp); s 396 lib/font/rbf_font.c void rbf_enable_cursor(int s, int e) s 399 lib/font/rbf_font.c cursor_start = s; s 92 lib/lang/lang.c char *p, *s, *e, *b; s 125 lib/lang/lang.c s = p; s 138 lib/lang/lang.c langbufneed += strlen(s) + 1; s 139 lib/lang/lang.c pstrtmp[i] = s; s 445 lib/lua/lapi.c LUA_API void lua_pushlstring (lua_State *L, const char *s, size_t len) { s 448 lib/lua/lapi.c setsvalue2s(L, L->top, luaS_newlstr(L, s, len)); s 454 lib/lua/lapi.c LUA_API void lua_pushstring (lua_State *L, const char *s) { s 455 lib/lua/lapi.c if (s == NULL) s 458 lib/lua/lapi.c lua_pushlstring(L, s, strlen(s)); s 159 lib/lua/lauxlib.c const char *s = lua_tolstring(L, narg, len); s 160 lib/lua/lauxlib.c if (!s) tag_error(L, narg, LUA_TSTRING); s 161 lib/lua/lauxlib.c return s; s 339 lib/lua/lauxlib.c LUALIB_API const char *luaL_gsub (lua_State *L, const char *s, const char *p, s 345 lib/lua/lauxlib.c while ((wild = strstr(s, p)) != NULL) { s 346 lib/lua/lauxlib.c luaL_addlstring(&b, s, wild - s); /* push prefix */ s 348 lib/lua/lauxlib.c s = wild + l; /* continue after `p' */ s 350 lib/lua/lauxlib.c luaL_addstring(&b, s); /* push last suffix */ s 434 lib/lua/lauxlib.c LUALIB_API void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l) { s 436 lib/lua/lauxlib.c luaL_addchar(B, *s++); s 440 lib/lua/lauxlib.c LUALIB_API void luaL_addstring (luaL_Buffer *B, const char *s) { s 441 lib/lua/lauxlib.c luaL_addlstring(B, s, strlen(s)); s 455 lib/lua/lauxlib.c const char *s = lua_tolstring(L, -1, &vl); s 457 lib/lua/lauxlib.c memcpy(B->p, s, vl); /* put it there */ s 631 lib/lua/lauxlib.c const char *s; s 642 lib/lua/lauxlib.c return ls->s; s 649 lib/lua/lauxlib.c ls.s = buff; s 655 lib/lua/lauxlib.c LUALIB_API int (luaL_loadstring) (lua_State *L, const char *s) { s 656 lib/lua/lauxlib.c return luaL_loadbuffer(L, s, strlen(s), s); s 80 lib/lua/lauxlib.h LUALIB_API int (luaL_loadstring) (lua_State *L, const char *s); s 85 lib/lua/lauxlib.h LUALIB_API const char *(luaL_gsub) (lua_State *L, const char *s, const char *p, s 114 lib/lua/lauxlib.h #define luaL_dostring(L, s) \ s 115 lib/lua/lauxlib.h (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0)) s 147 lib/lua/lauxlib.h LUALIB_API void (luaL_addlstring) (luaL_Buffer *B, const char *s, size_t l); s 148 lib/lua/lauxlib.h LUALIB_API void (luaL_addstring) (luaL_Buffer *B, const char *s); s 44 lib/lua/lbaselib.c const char *s; s 49 lib/lua/lbaselib.c s=numbuf; s 55 lib/lua/lbaselib.c s = lua_tostring(L, -1); /* get result */ s 56 lib/lua/lbaselib.c if (s == NULL) s 65 lib/lua/lbaselib.c if(buf_chars+strlen(s) >= max_buf_chars) { s 66 lib/lua/lbaselib.c strncpy(buf+buf_chars,s,max_buf_chars-buf_chars); s 70 lib/lua/lbaselib.c strcpy(buf+buf_chars,s); s 312 lib/lua/lbaselib.c const char *s = luaL_checklstring(L, 1, &l); s 313 lib/lua/lbaselib.c const char *chunkname = luaL_optstring(L, 2, s); s 314 lib/lua/lbaselib.c return load_aux(L, luaL_loadbuffer(L, s, l, chunkname)); s 225 lib/lua/lcode.c freereg(fs, e->u.s.info); s 250 lib/lua/lcode.c LUAI_FUNC int luaK_stringK (FuncState *fs, TString *s) { s 252 lib/lua/lcode.c setsvalue(fs->L, &o, s); s 295 lib/lua/lcode.c e->u.s.info = GETARG_A(getcode(fs, e)); s 311 lib/lua/lcode.c e->u.s.info = luaK_codeABC(fs, OP_GETUPVAL, 0, e->u.s.info, 0); s 316 lib/lua/lcode.c e->u.s.info = luaK_codeABx(fs, OP_GETGLOBAL, 0, e->u.s.info); s 321 lib/lua/lcode.c freereg(fs, e->u.s.aux); s 322 lib/lua/lcode.c freereg(fs, e->u.s.info); s 323 lib/lua/lcode.c e->u.s.info = luaK_codeABC(fs, OP_GETTABLE, 0, e->u.s.info, e->u.s.aux); s 355 lib/lua/lcode.c luaK_codeABx(fs, OP_LOADK, reg, e->u.s.info); s 368 lib/lua/lcode.c if (reg != e->u.s.info) s 369 lib/lua/lcode.c luaK_codeABC(fs, OP_MOVE, reg, e->u.s.info, 0); s 377 lib/lua/lcode.c e->u.s.info = reg; s 393 lib/lua/lcode.c luaK_concat(fs, &e->t, e->u.s.info); /* put this jump in `t' list */ s 409 lib/lua/lcode.c e->u.s.info = reg; s 425 lib/lua/lcode.c if (!hasjumps(e)) return e->u.s.info; /* exp is already in a register */ s 426 lib/lua/lcode.c if (e->u.s.info >= fs->nactvar) { /* reg. is not a local? */ s 427 lib/lua/lcode.c exp2reg(fs, e, e->u.s.info); /* put value on it */ s 428 lib/lua/lcode.c return e->u.s.info; s 432 lib/lua/lcode.c return e->u.s.info; s 452 lib/lua/lcode.c e->u.s.info = (e->k == VNIL) ? nilK(fs) : s 456 lib/lua/lcode.c return RKASK(e->u.s.info); s 461 lib/lua/lcode.c if (e->u.s.info <= MAXINDEXRK) /* constant fit in argC? */ s 462 lib/lua/lcode.c return RKASK(e->u.s.info); s 476 lib/lua/lcode.c exp2reg(fs, ex, var->u.s.info); s 481 lib/lua/lcode.c luaK_codeABC(fs, OP_SETUPVAL, e, var->u.s.info, 0); s 486 lib/lua/lcode.c luaK_codeABx(fs, OP_SETGLOBAL, e, var->u.s.info); s 491 lib/lua/lcode.c luaK_codeABC(fs, OP_SETTABLE, var->u.s.info, var->u.s.aux, e); s 509 lib/lua/lcode.c luaK_codeABC(fs, OP_SELF, func, e->u.s.info, luaK_exp2RK(fs, key)); s 511 lib/lua/lcode.c e->u.s.info = func; s 517 lib/lua/lcode.c Instruction *pc = getjumpcontrol(fs, e->u.s.info); s 535 lib/lua/lcode.c return condjump(fs, OP_TESTSET, NO_REG, e->u.s.info, cond); s 549 lib/lua/lcode.c pc = e->u.s.info; s 572 lib/lua/lcode.c pc = e->u.s.info; s 605 lib/lua/lcode.c e->u.s.info = luaK_codeABC(fs, OP_NOT, 0, e->u.s.info, 0); s 622 lib/lua/lcode.c t->u.s.aux = luaK_exp2RK(fs, k); s 667 lib/lua/lcode.c e1->u.s.info = luaK_codeABC(fs, op, 0, o1, o2); s 684 lib/lua/lcode.c e1->u.s.info = condjump(fs, op, cond, o1, o2); s 756 lib/lua/lcode.c lua_assert(e1->u.s.info == GETARG_B(getcode(fs, e2))-1); s 758 lib/lua/lcode.c SETARG_B(getcode(fs, e2), e1->u.s.info); s 759 lib/lua/lcode.c e1->k = VRELOCABLE; e1->u.s.info = e2->u.s.info; s 39 lib/lua/lcode.h #define getcode(fs,e) ((fs)->f->code[(e)->u.s.info]) s 51 lib/lua/lcode.h LUAI_FUNC int luaK_stringK (FuncState *fs, TString *s); s 61 lib/lua/ldump.c static void DumpString(const TString* s, DumpState* D) s 63 lib/lua/ldump.c if (s==NULL || getstr(s)==NULL) s 70 lib/lua/ldump.c size_t size=s->tsv.len+1; /* include trailing '\0' */ s 72 lib/lua/ldump.c DumpBlock(getstr(s),size,D); s 110 lib/lua/lfmathlib.c const char* s = (a < 0) ? "-" : ""; s 120 lib/lua/lfmathlib.c sprintf(fmt, "%s%%u.%%0%du", s, p); s 125 lib/lua/lfmathlib.c sprintf(buf, "%s%d", s, w); s 40 lib/lua/lgc.c #define stringmark(s) reset2bits((s)->tsv.marked, WHITE0BIT, WHITE1BIT) s 286 lib/lua/liolib.c char s[SCAN_NUM_MAX_CHARS]; s 296 lib/lua/liolib.c s[count++] = c; s 307 lib/lua/liolib.c s[count] = 0; s 309 lib/lua/liolib.c *r = (neg) ? -atoi(s) : atoi(s); s 482 lib/lua/liolib.c char s[12]; s 483 lib/lua/liolib.c sprintf(s,LUA_NUMBER_FMT,lua_tonumber(L,arg)); s 489 lib/lua/liolib.c fwrite(s, sizeof(char), strlen(s), f); s 494 lib/lua/liolib.c const char *s = luaL_checklstring(L, arg, &l); s 495 lib/lua/liolib.c status = status && ((size_t)fwrite(s, sizeof(char), l, f) == l); s 216 lib/lua/llex.c int s = ls->current; s 217 lib/lua/llex.c lua_assert(s == '[' || s == ']'); s 223 lib/lua/llex.c return (ls->current == s) ? count : (-count) - 1; s 77 lib/lua/llex.h LUAI_FUNC void luaX_syntaxerror (LexState *ls, const char *s); s 24 lib/lua/lmem.h #define luaM_freemem(L, b, s) luaM_realloc_(L, (b), (s), 0) s 90 lib/lua/lobject.c LUAI_FUNC int luaO_str2d (const char *s, lua_Number *result) { s 92 lib/lua/lobject.c *result = lua_str2number(s, &endptr); s 93 lib/lua/lobject.c if (endptr == s) return 0; /* conversion failed */ s 95 lib/lua/lobject.c *result = cast_num(strtoul(s, &endptr, 16)); s 121 lib/lua/lobject.c const char *s = va_arg(argp, char *); s 122 lib/lua/lobject.c if (s == NULL) s = "(null)"; s 123 lib/lua/lobject.c pushstr(L, s); s 355 lib/lua/lobject.h #define lmod(s,size) \ s 356 lib/lua/lobject.h (check_exp((size&(size-1))==0, (cast(int, (s) & ((size)-1))))) s 373 lib/lua/lobject.h LUAI_FUNC int luaO_str2d (const char *s, lua_Number *result); s 136 lib/lua/loslib.c const char *s = luaL_optstring(L, 1, "%c"); s 139 lib/lua/loslib.c if (*s == '!') { /* UTC? */ s 147 lib/lua/loslib.c s++; /* skip `!' */ s 153 lib/lua/loslib.c else if (strcmp(s, "*t") == 0) { s 170 lib/lua/loslib.c for (; *s; s++) { s 171 lib/lua/loslib.c if (*s != '%' || *(s + 1) == '\0') /* no conversion specifier? */ s 172 lib/lua/loslib.c luaL_addchar(&b, *s); s 176 lib/lua/loslib.c cc[1] = *(++s); s 129 lib/lua/lparser.c e->u.s.info = i; s 133 lib/lua/lparser.c static void codestring (LexState *ls, expdesc *e, TString *s) { s 134 lib/lua/lparser.c init_exp(e, VK, luaK_stringK(ls->fs, s)); s 188 lib/lua/lparser.c if (fs->upvalues[i].k == v->k && fs->upvalues[i].info == v->u.s.info) { s 202 lib/lua/lparser.c fs->upvalues[f->nups].info = cast_byte(v->u.s.info); s 240 lib/lua/lparser.c var->u.s.info = indexupvalue(fs, n, var); /* else was LOCAL or UPVAL */ s 252 lib/lua/lparser.c var->u.s.info = luaK_stringK(fs, varname); /* info points to global name */ s 459 lib/lua/lparser.c luaK_codeABC(fs, OP_SETTABLE, cc->t->u.s.info, rkkey, luaK_exp2RK(fs, &val)); s 469 lib/lua/lparser.c luaK_setlist(fs, cc->t->u.s.info, cc->na, cc->tostore); /* flush */ s 479 lib/lua/lparser.c luaK_setlist(fs, cc->t->u.s.info, cc->na, LUA_MULTRET); s 485 lib/lua/lparser.c luaK_setlist(fs, cc->t->u.s.info, cc->na, cc->tostore); s 643 lib/lua/lparser.c base = f->u.s.info; /* base register for call */ s 914 lib/lua/lparser.c if (lh->v.u.s.info == v->u.s.info) { /* conflict? */ s 916 lib/lua/lparser.c lh->v.u.s.info = extra; /* previous assignment will use safe copy */ s 918 lib/lua/lparser.c if (lh->v.u.s.aux == v->u.s.info) { /* conflict? */ s 920 lib/lua/lparser.c lh->v.u.s.aux = extra; /* previous assignment will use safe copy */ s 925 lib/lua/lparser.c luaK_codeABC(fs, OP_MOVE, fs->freereg, v->u.s.info, 0); /* make copy */ s 40 lib/lua/lparser.h struct { int info, aux; } s; s 96 lib/lua/lstring.c LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e) { s 98 lib/lua/lstring.c if (s > MAX_SIZET - sizeof(Udata)) s 100 lib/lua/lstring.c u = cast(Udata *, luaM_malloc(L, s + sizeof(Udata))); s 103 lib/lua/lstring.c u->uv.len = s; s 16 lib/lua/lstring.h #define sizestring(s) (sizeof(union TString)+((s)->len+1)*sizeof(char)) s 20 lib/lua/lstring.h #define luaS_new(L, s) (luaS_newlstr(L, s, strlen(s))) s 21 lib/lua/lstring.h #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ s 22 lib/lua/lstring.h (sizeof(s)/sizeof(char))-1)) s 24 lib/lua/lstring.h #define luaS_fix(s) l_setbit((s)->tsv.marked, FIXEDBIT) s 27 lib/lua/lstring.h LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e); s 45 lib/lua/lstrlib.c const char *s = luaL_checklstring(L, 1, &l); s 51 lib/lua/lstrlib.c lua_pushlstring(L, s+start-1, end-start+1); s 60 lib/lua/lstrlib.c const char *s = luaL_checklstring(L, 1, &l); s 62 lib/lua/lstrlib.c while (l--) luaL_addchar(&b, s[l]); s 72 lib/lua/lstrlib.c const char *s = luaL_checklstring(L, 1, &l); s 75 lib/lua/lstrlib.c luaL_addchar(&b, tolower(uchar(s[i]))); s 85 lib/lua/lstrlib.c const char *s = luaL_checklstring(L, 1, &l); s 88 lib/lua/lstrlib.c luaL_addchar(&b, toupper(uchar(s[i]))); s 96 lib/lua/lstrlib.c const char *s = luaL_checklstring(L, 1, &l); s 100 lib/lua/lstrlib.c luaL_addlstring(&b, s, l); s 108 lib/lua/lstrlib.c const char *s = luaL_checklstring(L, 1, &l); s 120 lib/lua/lstrlib.c lua_pushinteger(L, uchar(s[posi+i-1])); s 278 lib/lua/lstrlib.c static const char *match (MatchState *ms, const char *s, const char *p); s 281 lib/lua/lstrlib.c static const char *matchbalance (MatchState *ms, const char *s, s 285 lib/lua/lstrlib.c if (*s != *p) return NULL; s 290 lib/lua/lstrlib.c while (++s < ms->src_end) { s 291 lib/lua/lstrlib.c if (*s == e) { s 292 lib/lua/lstrlib.c if (--cont == 0) return s+1; s 294 lib/lua/lstrlib.c else if (*s == b) cont++; s 301 lib/lua/lstrlib.c static const char *max_expand (MatchState *ms, const char *s, s 304 lib/lua/lstrlib.c while ((s+i)<ms->src_end && singlematch(uchar(*(s+i)), p, ep)) s 308 lib/lua/lstrlib.c const char *res = match(ms, (s+i), ep+1); s 316 lib/lua/lstrlib.c static const char *min_expand (MatchState *ms, const char *s, s 319 lib/lua/lstrlib.c const char *res = match(ms, s, ep+1); s 322 lib/lua/lstrlib.c else if (s<ms->src_end && singlematch(uchar(*s), p, ep)) s 323 lib/lua/lstrlib.c s++; /* try with one more repetition */ s 329 lib/lua/lstrlib.c static const char *start_capture (MatchState *ms, const char *s, s 334 lib/lua/lstrlib.c ms->capture[level].init = s; s 337 lib/lua/lstrlib.c if ((res=match(ms, s, p)) == NULL) /* match failed? */ s 343 lib/lua/lstrlib.c static const char *end_capture (MatchState *ms, const char *s, s 347 lib/lua/lstrlib.c ms->capture[l].len = s - ms->capture[l].init; /* close capture */ s 348 lib/lua/lstrlib.c if ((res = match(ms, s, p)) == NULL) /* match failed? */ s 354 lib/lua/lstrlib.c static const char *match_capture (MatchState *ms, const char *s, int l) { s 358 lib/lua/lstrlib.c if ((size_t)(ms->src_end-s) >= len && s 359 lib/lua/lstrlib.c memcmp(ms->capture[l].init, s, len) == 0) s 360 lib/lua/lstrlib.c return s+len; s 365 lib/lua/lstrlib.c static const char *match (MatchState *ms, const char *s, const char *p) { s 370 lib/lua/lstrlib.c return start_capture(ms, s, p+2, CAP_POSITION); s 372 lib/lua/lstrlib.c return start_capture(ms, s, p+1, CAP_UNFINISHED); s 375 lib/lua/lstrlib.c return end_capture(ms, s, p+1); s 380 lib/lua/lstrlib.c s = matchbalance(ms, s, p+2); s 381 lib/lua/lstrlib.c if (s == NULL) return NULL; s 391 lib/lua/lstrlib.c previous = (s == ms->src_init) ? '\0' : *(s-1); s 393 lib/lua/lstrlib.c !matchbracketclass(uchar(*s), p, ep-1)) return NULL; s 398 lib/lua/lstrlib.c s = match_capture(ms, s, uchar(*(p+1))); s 399 lib/lua/lstrlib.c if (s == NULL) return NULL; s 407 lib/lua/lstrlib.c return s; /* match succeeded */ s 411 lib/lua/lstrlib.c return (s == ms->src_end) ? s : NULL; /* check end of string */ s 416 lib/lua/lstrlib.c int m = s<ms->src_end && singlematch(uchar(*s), p, ep); s 420 lib/lua/lstrlib.c if (m && ((res=match(ms, s+1, ep+1)) != NULL)) s 425 lib/lua/lstrlib.c return max_expand(ms, s, p, ep); s 428 lib/lua/lstrlib.c return (m ? max_expand(ms, s+1, p, ep) : NULL); s 431 lib/lua/lstrlib.c return min_expand(ms, s, p, ep); s 435 lib/lua/lstrlib.c s++; p=ep; goto init; /* else return match(ms, s+1, ep); */ s 466 lib/lua/lstrlib.c static void push_onecapture (MatchState *ms, int i, const char *s, s 470 lib/lua/lstrlib.c lua_pushlstring(ms->L, s, e - s); /* add whole match */ s 485 lib/lua/lstrlib.c static int push_captures (MatchState *ms, const char *s, const char *e) { s 487 lib/lua/lstrlib.c int nlevels = (ms->level == 0 && s) ? 1 : ms->level; s 490 lib/lua/lstrlib.c push_onecapture(ms, i, s, e); s 497 lib/lua/lstrlib.c const char *s = luaL_checklstring(L, 1, &l1); s 505 lib/lua/lstrlib.c const char *s2 = lmemfind(s+init, l1-init, p, l2); s 507 lib/lua/lstrlib.c lua_pushinteger(L, s2-s+1); s 508 lib/lua/lstrlib.c lua_pushinteger(L, s2-s+l2); s 515 lib/lua/lstrlib.c const char *s1=s+init; s 517 lib/lua/lstrlib.c ms.src_init = s; s 518 lib/lua/lstrlib.c ms.src_end = s+l1; s 524 lib/lua/lstrlib.c lua_pushinteger(L, s1-s+1); /* start */ s 525 lib/lua/lstrlib.c lua_pushinteger(L, res-s); /* end */ s 551 lib/lua/lstrlib.c const char *s = lua_tolstring(L, lua_upvalueindex(1), &ls); s 555 lib/lua/lstrlib.c ms.src_init = s; s 556 lib/lua/lstrlib.c ms.src_end = s+ls; s 557 lib/lua/lstrlib.c for (src = s + (size_t)lua_tointeger(L, lua_upvalueindex(3)); s 563 lib/lua/lstrlib.c lua_Integer newstart = e-s; s 590 lib/lua/lstrlib.c static void add_s (MatchState *ms, luaL_Buffer *b, const char *s, s 602 lib/lua/lstrlib.c luaL_addlstring(b, s, e - s); s 604 lib/lua/lstrlib.c push_onecapture(ms, news[i] - '1', s, e); s 612 lib/lua/lstrlib.c static void add_value (MatchState *ms, luaL_Buffer *b, const char *s, s 618 lib/lua/lstrlib.c add_s(ms, b, s, e); s 624 lib/lua/lstrlib.c n = push_captures(ms, s, e); s 629 lib/lua/lstrlib.c push_onecapture(ms, 0, s, e); s 636 lib/lua/lstrlib.c lua_pushlstring(L, s, e - s); /* keep original text */ s 698 lib/lua/lstrlib.c const char *s = luaL_checklstring(L, arg, &l); s 701 lib/lua/lstrlib.c switch (*s) { s 704 lib/lua/lstrlib.c luaL_addchar(b, *s); s 716 lib/lua/lstrlib.c luaL_addchar(b, *s); s 720 lib/lua/lstrlib.c s++; s 801 lib/lua/lstrlib.c const char *s = luaL_checklstring(L, arg, &l); s 810 lib/lua/lstrlib.c sprintf(buff, form, s); s 140 lib/lua/lua.c static int dostring (lua_State *L, const char *s, const char *name) { s 141 lib/lua/lua.c int status = luaL_loadbuffer(L, s, strlen(s), name) || docall(L, 0, 1); s 341 lib/lua/lua.c struct Smain *s = (struct Smain *)lua_touserdata(L, 1); s 342 lib/lua/lua.c char **argv = s->argv; s 350 lib/lua/lua.c s->status = handle_luainit(L); s 351 lib/lua/lua.c if (s->status != 0) return 0; s 355 lib/lua/lua.c s->status = 1; s 359 lib/lua/lua.c s->status = runargs(L, argv, (script > 0) ? script : s->argc); s 360 lib/lua/lua.c if (s->status != 0) return 0; s 362 lib/lua/lua.c s->status = handle_script(L, argv, script); s 363 lib/lua/lua.c if (s->status != 0) return 0; s 379 lib/lua/lua.c struct Smain s; s 385 lib/lua/lua.c s.argc = argc; s 386 lib/lua/lua.c s.argv = argv; s 387 lib/lua/lua.c status = lua_cpcall(L, &pmain, &s); s 390 lib/lua/lua.c return (status || s.status) ? EXIT_FAILURE : EXIT_SUCCESS; s 163 lib/lua/lua.h LUA_API void (lua_pushlstring) (lua_State *L, const char *s, size_t l); s 164 lib/lua/lua.h LUA_API void (lua_pushstring) (lua_State *L, const char *s); s 273 lib/lua/lua.h #define lua_pushliteral(L, s) \ s 274 lib/lua/lua.h lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1) s 276 lib/lua/lua.h #define lua_setglobal(L,s) lua_setfield(L, LUA_GLOBALSINDEX, (s)) s 277 lib/lua/lua.h #define lua_getglobal(L,s) lua_getfield(L, LUA_GLOBALSINDEX, (s)) s 68 lib/lua/luac.c #define IS(s) (strcmp(argv[i],s)==0) s 160 lib/lua/luac.c struct Smain* s = (struct Smain*)lua_touserdata(L, 1); s 161 lib/lua/luac.c int argc=s->argc; s 162 lib/lua/luac.c char** argv=s->argv; s 189 lib/lua/luac.c struct Smain s; s 195 lib/lua/luac.c s.argc=argc; s 196 lib/lua/luac.c s.argv=argv; s 197 lib/lua/luac.c if (lua_cpcall(L,pmain,&s)!=0) fatal(lua_tostring(L,-1)); s 547 lib/lua/luaconf.h #define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n)) s 549 lib/lua/luaconf.h #define lua_str2number(s,p) strtol((s), (p), 10) s 630 lib/lua/luaconf.h #define LUAI_USER_ALIGNMENT_T union { double u; void *s; long l; } s 31 lib/lua/lundump.c #define IF(c,s) s 32 lib/lua/lundump.c #define error(S,s) s 34 lib/lua/lundump.c #define IF(c,s) if (c) error(S,s) s 84 lib/lua/lundump.c char* s=luaZ_openspace(S->L,S->b,size); s 85 lib/lua/lundump.c LoadBlock(S,s,size); s 86 lib/lua/lundump.c return luaS_newlstr(S->L,s,size-1); /* remove trailing '\0' */ s 186 lib/lua/lundump.c char s[LUAC_HEADERSIZE]; s 188 lib/lua/lundump.c LoadBlock(S,s,LUAC_HEADERSIZE); s 189 lib/lua/lundump.c IF (memcmp(h,s,LUAC_HEADERSIZE)!=0, "bad header"); s 67 lib/lua/lvm.c char s[LUAI_MAXNUMBER2STR]; s 69 lib/lua/lvm.c lua_number2str(s, n); s 70 lib/lua/lvm.c setsvalue2s(L, obj, luaS_new(L, s)); s 25 lib/lua/print.c const char* s=getstr(ts); s 30 lib/lua/print.c int c=s[i]; s 163 lib/lua/print.c const char* s=getstr(f->source); s 164 lib/lua/print.c if (*s=='@' || *s=='=') s 165 lib/lua/print.c s++; s 166 lib/lua/print.c else if (*s==LUA_SIGNATURE[0]) s 167 lib/lua/print.c s="(bstring)"; s 169 lib/lua/print.c s="(string)"; s 171 lib/lua/print.c (f->linedefined==0)?"main":"function",s, s 361 modules/cpuinfo_v7.c char *s=""; s 367 modules/cpuinfo_v7.c case 0: s = "Inner Non-cacheable"; break; s 368 modules/cpuinfo_v7.c case 1: s = "Inner Write-back, write-allocate"; break; s 369 modules/cpuinfo_v7.c case 2: s = "Inner Write-through, no write-allocate"; break; s 370 modules/cpuinfo_v7.c case 3: s = "Inner Write-back, no write-allocate"; break; s 378 modules/cpuinfo_v7.c sprintf(linebuf,"%s; %s; %s",s, s2, t); s 382 modules/cpuinfo_v7.c case 0: s = "Strongly ordered, shareable"; t=""; break; s 383 modules/cpuinfo_v7.c case 1: s = "Shareable device"; t="Shareable"; break; s 384 modules/cpuinfo_v7.c case 2: s = "Outer and Inner write-through, no write-allocate"; break; s 385 modules/cpuinfo_v7.c case 3: s = "Outer and Inner write-back, no write-allocate"; break; s 386 modules/cpuinfo_v7.c case 8: s = "Outer and Inner Non-cacheable"; break; s 387 modules/cpuinfo_v7.c case 11: s = "Outer and Inner write-back, write-allocate"; break; s 388 modules/cpuinfo_v7.c case 16: s = "Non-shareable Device"; t=""; break; s 389 modules/cpuinfo_v7.c default: s = "(reserved)"; t=""; s 391 modules/cpuinfo_v7.c sprintf(linebuf,"%s; %s",s, t); s 124 modules/curves.c void curve_set_file(const char *s) { s 126 modules/curves.c if(s) { s 127 modules/curves.c if(strncmp(s,"A/",2)==0) strncpy(conf.curve_file,s,99); s 132 modules/curves.c strncpy(&conf.curve_file[l+1],s,99-l-1); s 172 modules/exmem_inspector.c char *s = get_exmem_type_name(exl[n].typ); s 173 modules/exmem_inspector.c if (!s) s 179 modules/exmem_inspector.c s += 6; // chop off 'EXMEM_' s 180 modules/exmem_inspector.c strncpy(name, s, 17); name[17] = 0; s 316 modules/exmem_inspector.c char *s = get_exmem_type_name(idx); s 317 modules/exmem_inspector.c if (!s) s 324 modules/exmem_inspector.c s += 6; // chop off 'EXMEM_' s 325 modules/exmem_inspector.c strncpy(name, s, 17); name[17] = 0; s 349 modules/exmem_inspector.c char *s = get_exmem_type_name(exl[idx].typ); s 350 modules/exmem_inspector.c if (!s) s 351 modules/exmem_inspector.c s = " -"; s 354 modules/exmem_inspector.c s += 6; // chop off 'EXMEM_' s 355 modules/exmem_inspector.c strncpy(name, s, 17); name[17] = 0; s 457 modules/eyefi.c static char s[80]; s 458 modules/eyefi.c sprintf(s,"Delete \"%s\"?",eyefi_selectedNetwork); s 459 modules/eyefi.c gui_mbox_init(LANG_POPUP_DELETE,(int)s/*LANG_ARE_YOU_SURE*/,MBOX_BTN_YES_NO|MBOX_DEF_BTN2,confirm_delete_network_cb); s 506 modules/file_shelter.c char *s = *wl; s 507 modules/file_shelter.c while (s) { s 508 modules/file_shelter.c if (strcasecmp(name, s) == 0) { s 511 modules/file_shelter.c s = *(++wl); s 109 modules/firmware_crc.c char *s = out; s 114 modules/firmware_crc.c s += sprintf(out,"%s\n%s %s\n%s\n", s 126 modules/firmware_crc.c s += sprintf(s,"%8x ",blocks[b].start); s 131 modules/firmware_crc.c sprintf(s,"\n%s",lang_str(LANG_FIRMWARE_CRC_DUMP_ROM)); s 15 modules/gui_bench.c #define draw_txt_string(x,y,s,c) draw_string((x)*FONT_WIDTH,(y)*FONT_HEIGHT,s,c) s 16 modules/gui_bench.c #define draw_txt_stringnonalign(x,y,s,c) draw_string((x)*FONT_WIDTH+1,(y)*FONT_HEIGHT,s,c) s 140 modules/gui_bench.c int s=(ss==0)?0:FONT_WIDTH*FONT_HEIGHT*value/ss; s 142 modules/gui_bench.c sprintf(buf, " %d, %d c/s %d, %d FPS", value, valuen, s, sn); s 179 modules/gui_bench.c static int bench_draw_control_txt(int pos, const char *s, int active) { s 186 modules/gui_bench.c draw_txt_string(pos, 0, s, cl); s 187 modules/gui_bench.c return pos+strlen(s); s 325 modules/gui_bench.c register unsigned int s; s 330 modules/gui_bench.c s = camera_screen.buffer_size; s 342 modules/gui_bench.c :: "r" (c), "r" (scr), "r" (scr+s) : "r0", "r1" s 346 modules/gui_bench.c bench.screen_output_bps = (t==0)?0:s*64*100 / (t/10); s 355 modules/gui_bench.c register unsigned int n, s; s 360 modules/gui_bench.c s = vid_get_viewport_byte_width() * vid_get_viewport_height_proper(); s 362 modules/gui_bench.c if ((s < 1) || (s > 360*240*3)) s = 360*240*3; s 363 modules/gui_bench.c bench.screen_input_size = s; s 373 modules/gui_bench.c :: "r" (scr), "r" (scr+s) : "r0", "r1" s 377 modules/gui_bench.c bench.screen_input_bps = (t==0)?0:s*32*100 / (t/10); s 528 modules/gui_bench.c unsigned int n, s; s 571 modules/gui_bench.c s=write(x, hook_raw_image_addr(), camera_sensor.raw_size)/1024; s 574 modules/gui_bench.c bench.disk_write_raw_kbps = (t==0)?0:s*100 / (t/10); s 583 modules/gui_bench.c s=write(x, (void*)0x10000, 0xC00000)/1024; s 586 modules/gui_bench.c bench.disk_write_mem_kbps = (t==0)?0:s*100 / (t/10); s 595 modules/gui_bench.c s = 0; s 598 modules/gui_bench.c s+=write(x, benchbuf, 0x10000); s 600 modules/gui_bench.c s = s / 1024; s 602 modules/gui_bench.c bench.disk_write_buf_kbps = (t==0)?0:s*100 / (t/10); s 612 modules/gui_bench.c s = 0; s 615 modules/gui_bench.c s+=read(x, benchbuf, 0x10000); s 617 modules/gui_bench.c s = s / 1024; s 619 modules/gui_bench.c bench.disk_read_buf_kbps = (t==0)?0:s*100 / (t/10); s 1581 modules/gui_fselect.c char *s = strrchr(items.dir, '/'); s 1582 modules/gui_fselect.c if (s) *s = 0; s 52 modules/gui_osd_edit.c #define SCL(v,s) ((scalemul[s]*(v))>>1) s 400 modules/luascript.c const char *s = luaL_checklstring(L, 1, &l); s 401 modules/luascript.c libcurves->curve_set_file(s); s 302 modules/md5.c #define MD5STEP(f, w, x, y, z, data, s) \ s 303 modules/md5.c ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x ) s 156 modules/module_inspector.c char *s = strrchr(mod->hMod->name, '/'); s 157 modules/module_inspector.c if (s) s = s + 1; else s = mod->hMod->name; s 158 modules/module_inspector.c strncpy(name, s, 12); name[12] = 0; s 85 modules/raw_merge.c unsigned short s,d; s 124 modules/raw_merge.c s = ((0x3fc&(((unsigned short)bsub[i+1])<<2)) | (bsub[i+0] >> 6)); s 126 modules/raw_merge.c d = raw_subtract_values(d,s); s 130 modules/raw_merge.c s = ((0x3f0&(((unsigned short)bsub[i+0])<<4)) | (bsub[i+3] >> 4)); s 132 modules/raw_merge.c d = raw_subtract_values(d,s); s 136 modules/raw_merge.c s = ((0x3c0&(((unsigned short)bsub[i+3])<<6)) | (bsub[i+2] >> 2)); s 138 modules/raw_merge.c d = raw_subtract_values(d,s); s 142 modules/raw_merge.c s = ((0x300&(((unsigned short)bsub[i+2])<<8)) | (bsub[i+5])); s 144 modules/raw_merge.c d = raw_subtract_values(d,s); s 148 modules/raw_merge.c s = ((0x3fc&(((unsigned short)bsub[i+4])<<2)) | (bsub[i+7] >> 6)); s 150 modules/raw_merge.c d = raw_subtract_values(d,s); s 154 modules/raw_merge.c s = ((0x3f0&(((unsigned short)bsub[i+7])<<4)) | (bsub[i+6] >> 4)); s 156 modules/raw_merge.c d = raw_subtract_values(d,s); s 160 modules/raw_merge.c s = ((0x3c0&(((unsigned short)bsub[i+6])<<6)) | (bsub[i+9] >> 2)); s 162 modules/raw_merge.c d = raw_subtract_values(d,s); s 166 modules/raw_merge.c s = ((0x300&(((unsigned short)bsub[i+9])<<8)) | (bsub[i+8])); s 168 modules/raw_merge.c d = raw_subtract_values(d,s); s 177 modules/raw_merge.c s = ((0xFF0&(((unsigned short)bsub[i+1])<<4)) | (bsub[i+0] >> 4)); s 179 modules/raw_merge.c d = raw_subtract_values(d,s); s 183 modules/raw_merge.c s = ((0xF00&(((unsigned short)bsub[i+0])<<8)) | (bsub[i+3] )); s 185 modules/raw_merge.c d = raw_subtract_values(d,s); s 189 modules/raw_merge.c s = ((0xFF0&(((unsigned short)bsub[i+2])<<4)) | (bsub[i+5] >> 4)); s 191 modules/raw_merge.c d = raw_subtract_values(d,s); s 195 modules/raw_merge.c s = ((0xF00&(((unsigned short)bsub[i+5])<<8)) | (bsub[i+4] )); s 197 modules/raw_merge.c d = raw_subtract_values(d,s); s 206 modules/raw_merge.c s = ((unsigned short)(bsub[i+ 1]) << 6) | (bsub[i+ 0] >> 2); s 208 modules/raw_merge.c d = raw_subtract_values(d,s); s 212 modules/raw_merge.c s = ((unsigned short)(bsub[i+ 0] & 0x03) << 12) | ((unsigned short)(bsub[i+ 3]) << 4) | (bsub[i+ 2] >> 4); s 214 modules/raw_merge.c d = raw_subtract_values(d,s); s 219 modules/raw_merge.c s = ((unsigned short)(bsub[i+ 2] & 0x0F) << 10) | ((unsigned short)(bsub[i+ 5]) << 2) | (bsub[i+ 4] >> 6); s 221 modules/raw_merge.c d = raw_subtract_values(d,s); s 226 modules/raw_merge.c s = ((unsigned short)(bsub[i+ 4] & 0x3F) << 8) | (bsub[i+ 7]); s 228 modules/raw_merge.c d = raw_subtract_values(d,s); s 232 modules/raw_merge.c s = ((unsigned short)(bsub[i+ 6]) << 6) | (bsub[i+ 9] >> 2); s 234 modules/raw_merge.c d = raw_subtract_values(d,s); s 238 modules/raw_merge.c s = ((unsigned short)(bsub[i+ 9] & 0x03) << 12) | ((unsigned short)(bsub[i+ 8]) << 4) | (bsub[i+11] >> 4); s 240 modules/raw_merge.c d = raw_subtract_values(d,s); s 245 modules/raw_merge.c s = ((unsigned short)(bsub[i+11] & 0x0F) << 10) | ((unsigned short)(bsub[i+10]) << 2) | (bsub[i+13] >> 6); s 247 modules/raw_merge.c d = raw_subtract_values(d,s); s 252 modules/raw_merge.c s = ((unsigned short)(bsub[i+13] & 0x3F) << 8) | (bsub[i+12]); s 254 modules/raw_merge.c d = raw_subtract_values(d,s); s 609 modules/rawhookops.c const char *s=lua_tostring(L,4); s 610 modules/rawhookops.c if(!s || strcmp(s,"count") != 0) { s 243 modules/zebra.c int v, s, x, y, over; s 279 modules/zebra.c s = sy + sx*2; s 292 modules/zebra.c buf[s] = buf[s+1] = cls[sel]; s 293 modules/zebra.c buf[s+2] = buf[s+3] = cls[sel]; s 296 modules/zebra.c buf[s] = buf[s+1] = COLOR_TRANSPARENT; s 298 modules/zebra.c buf[s] = buf[s+1] = (yy>over)?cl_over:(yy<conf.zebra_under)?cl_under:COLOR_TRANSPARENT; s 300 modules/zebra.c if (buf[s] != COLOR_TRANSPARENT && !zebra_drawn) s 351 modules/zebra.c int v, s, x, y, over; s 376 modules/zebra.c s = aspOffset; s 378 modules/zebra.c for (x=0; x<camera_screen.width; x+=step_x, s+=step_x, v+=step_v) { s 394 modules/zebra.c buf[s]=buf[s+1]=cls[sel]; s 396 modules/zebra.c else if (((conf.zebra_mode == ZEBRA_MODE_ZEBRA_1 || conf.zebra_mode == ZEBRA_MODE_ZEBRA_2) && (y-x-timer)&f)) buf[s]=COLOR_TRANSPARENT; s 397 modules/zebra.c else buf[s]=(yy>over)?cl_over:(yy<conf.zebra_under)?cl_under:COLOR_TRANSPARENT; s 398 modules/zebra.c if (buf[s] != COLOR_TRANSPARENT && !zebra_drawn) zebra_drawn = 1; s 401 modules/zebra.c if(get_cur_buf(s)!=COLOR_TRANSPARENT) buf[s]=get_cur_buf(s); s 402 modules/zebra.c if(conf.zebra_multichannel && get_cur_buf(s+1)!=COLOR_TRANSPARENT) buf[s+1]=get_cur_buf(s+1); s 405 modules/zebra.c s+=camera_screen.buffer_width-camera_screen.width; s 406 modules/zebra.c if (y*camera_screen.height/viewport_height == (s+camera_screen.buffer_width)/camera_screen.buffer_width) { s 407 modules/zebra.c memcpy(buf+s, buf+s-camera_screen.buffer_width, camera_screen.buffer_width); s 408 modules/zebra.c s+=camera_screen.buffer_width; s 424 modules/zebra.c for (s = camera_screen.buffer_width*ZFIX_TOP; s < buffer_size-camera_screen.buffer_width*ZFIX_BOTTOM; s++) { s 425 modules/zebra.c buf[s]=COLOR_TRANSPARENT; s 851 platform/generic/wrappers.c long strlen(const char *s) { s 852 platform/generic/wrappers.c return _strlen(s); s 863 platform/generic/wrappers.c char *strchr(const char *s, int c) { s 864 platform/generic/wrappers.c return _strchr(s, c); s 879 platform/generic/wrappers.c char *strrchr(const char *s, int c) { s 880 platform/generic/wrappers.c return _strrchr(s, c); s 896 platform/generic/wrappers.c char *strpbrk(const char *s, const char *accept) s 898 platform/generic/wrappers.c return _strpbrk(s, accept); s 904 platform/generic/wrappers.c long sprintf(char *s, const char *st, ...) s 909 platform/generic/wrappers.c res = _vsprintf(s, st, va); s 968 platform/generic/wrappers.c long strftime(char *s, unsigned long maxsize, const char *format, const struct tm *timp) { s 969 platform/generic/wrappers.c return _strftime(s,maxsize,format,timp); s 1095 platform/generic/wrappers.c void *memset(void *s, int c, int n) { s 1096 platform/generic/wrappers.c return _memset(s, c, n); s 1104 platform/generic/wrappers.c void *memchr(const void *s, int c, int n) { s 1105 platform/generic/wrappers.c return _memchr(s,c,n); s 1540 platform/generic/wrappers.c int my_some_f(char *s, int x){ s 1542 platform/generic/wrappers.c f=strstr(s, DNG_EXT_FROM); s 1544 platform/generic/wrappers.c return default_some_f(s, x); s 1882 platform/generic/wrappers.c char s[256]; s 1885 platform/generic/wrappers.c _vsprintf(s, fmt, va); s 1889 platform/generic/wrappers.c _ExecuteEventProcedure("Printf",s); s 56 platform/ixus310_elph500hs/kbd.c #define LB(x,n,s) TS_XL+x*TS_W, TS_YT+n*TS_H, TS_XL+(x+1)*TS_W-1, TS_YT+n*TS_H+TS_H-1, s s 57 platform/ixus310_elph500hs/kbd.c #define RB(x,n,s) TS_XR-x*TS_W, TS_YT+n*TS_H, TS_XR-(x-1)*TS_W-1, TS_YT+n*TS_H+TS_H-1, s s 301 tools/capdis.c char *s=(char *)adr2ptr_with_data(fw,adr); s 302 tools/capdis.c if(!s) { s 309 tools/capdis.c uint32_t adr2=*(uint32_t *)s; s 311 tools/capdis.c s=(char *)adr2ptr_with_data(fw,adr2); s 312 tools/capdis.c if(!s) { s 338 tools/capdis.c if((int)strlen(s) < r) { s 339 tools/capdis.c e=p+strlen(s); s 351 tools/capdis.c if(*s == '\r') { s 354 tools/capdis.c } else if(*s == '\n') { s 358 tools/capdis.c *p++=*s; s 360 tools/capdis.c s++; s 289 tools/chdk_dasm.c char s[500]; s 297 tools/chdk_dasm.c s[i++] = '\\'; s 298 tools/chdk_dasm.c s[i++] = 'r'; s 301 tools/chdk_dasm.c s[i++] = '\\'; s 302 tools/chdk_dasm.c s[i++] = 'n'; s 305 tools/chdk_dasm.c s[i++] = '\\'; s 306 tools/chdk_dasm.c s[i++] = 't'; s 309 tools/chdk_dasm.c s[i++] = *p; s 314 tools/chdk_dasm.c s[i] = 0; s 315 tools/chdk_dasm.c op += sprintf(op," /*'%s'*/",s); s 324 tools/chdk_dasm.c char *s = op; s 348 tools/chdk_dasm.c strcpy(patch_ref_name[save_patch_ref],s+1); s 395 tools/chdk_dasm.c char *s = op; s 453 tools/chdk_dasm.c strcpy(patch_ref_name[save_patch_ref],s); s 1464 tools/chdk_dasm.c void swiname(__attribute__ ((unused))t_value w, __attribute__ ((unused))char * s, __attribute__ ((unused))size_t sz) { return; } s 46 tools/chdk_dasm.h #define declstruct(name) typedef struct name s##name, * p##name s 48 tools/chdk_dasm.h #define defequiv(new,old) typedef struct old s##new, * p##new s 475 tools/code_gen.c void set_op_comment(op *p, char *s) s 477 tools/code_gen.c if (s) s 479 tools/code_gen.c p->comment = malloc(strlen(s)+1); s 480 tools/code_gen.c strcpy(p->comment,s); s 78 tools/elf2flt/elfflt.c static struct elf32_sym s; s 86 tools/elf2flt/elfflt.c for(a = symtaboff; a < symtaboff + symtabsize; a += sizeof(s)) { s 87 tools/elf2flt/elfflt.c ret = b_seek_read(a, (char *)&s, sizeof(s)); s 91 tools/elf2flt/elfflt.c if(s.st_name != 0) { s 92 tools/elf2flt/elfflt.c ret = b_seek_read(strtaboff + s.st_name, name, sizeof(name)); s 97 tools/elf2flt/elfflt.c sect = find_section(s.st_shndx); s 100 tools/elf2flt/elfflt.c return &s; s 111 tools/elf2flt/elfflt.c struct elf32_sym* s; s 114 tools/elf2flt/elfflt.c s = find_symbol(symbol); s 115 tools/elf2flt/elfflt.c if ( !s ) { s 120 tools/elf2flt/elfflt.c sect = find_section(s->st_shndx); s 133 tools/elf2flt/elfflt.c return sect->flat_offset + s->st_value; s 142 tools/elf2flt/elfflt.c struct elf32_sym s; s 177 tools/elf2flt/elfflt.c (char *)&s, sizeof(s)); s 180 tools/elf2flt/elfflt.c ret = b_seek_read( strtaboff + s.st_name, name, sizeof(name)); s 184 tools/elf2flt/elfflt.c if ( s.st_shndx == 0 ) s 205 tools/elf2flt/elfflt.c ret = apply_import( base_sect, &rela, importidx, &s); s 210 tools/elf2flt/elfflt.c tgtsect = find_section( s.st_shndx ); s 213 tools/elf2flt/elfflt.c PRINTERR(stderr, "elf2flt unknown segment %d for name: '%s'\n", s.st_shndx, name); s 217 tools/elf2flt/elfflt.c ret = apply_realloc( base_sect, &rela, tgtsect, &s, relidx /*addr - symsect->address*/); s 228 tools/elf2flt/elfflt.c struct elf32_sym s; s 233 tools/elf2flt/elfflt.c for(a = symtaboff; a < symtaboff + symtabsize; a += sizeof(s)) s 235 tools/elf2flt/elfflt.c ret = b_seek_read(a, (char *)&s, sizeof(s)); s 240 tools/elf2flt/elfflt.c ret = b_seek_read(strtaboff + s.st_name, name, sizeof(name)-2); s 242 tools/elf2flt/elfflt.c printf("SYMBOL %x [%02x: %-15s] - value=0x%x, size=%d, info=0x%x, section=%d\n", a, s.st_name, name, s.st_value, s.st_size, s.st_info, s.st_shndx); s 326 tools/elf2flt/elfflt.c struct elf32_sym* s; s 330 tools/elf2flt/elfflt.c s = find_symbol("__div0"); s 332 tools/elf2flt/elfflt.c if ( !s) return ELFFLT_OK; s 334 tools/elf2flt/elfflt.c if (s->st_shndx != text.number) { s 359 tools/elf2flt/elfflt.c rv = apply_realloc( &text, &rela, &text, s, -1); s 362 tools/elf2flt/elfflt.c s = find_symbol(".divsi3_skip_div0_test"); s 363 tools/elf2flt/elfflt.c if ( s && s->st_shndx == text.number ) { s 364 tools/elf2flt/elfflt.c offs_divsi3_skip_div0_test = text.flat_offset + s->st_value + 0x114; s 366 tools/elf2flt/elfflt.c s = find_symbol("__aeabi_uidiv"); s 367 tools/elf2flt/elfflt.c if ( s && s->st_shndx == text.number ) { s 368 tools/elf2flt/elfflt.c offs__aeabi_uidiv = text.flat_offset + s->st_value + 0xec; s 130 tools/elf2flt/myio.c char* s=p; s 141 tools/elf2flt/myio.c sscanf(s,"%x ",&h); s 142 tools/elf2flt/myio.c import_syms[import_counts] = s+9; s 145 tools/elf2flt/myio.c s = p + 1; s 22 tools/extract_event_procedures.c #define MATCH_FOUND(s, addr) printf("MakeNameEx(0x%x, \"%s\", SN_PUBLIC);\n", addr, s) s 155 tools/finsig_dryos.c void addMatch(uint32_t fadr, int s, int f, int sig) s 158 tools/finsig_dryos.c matches[count].success = s; s 165 tools/finsig_dryos.c void fwAddMatch(firmware *fw, uint32_t fadr, int s, int f, int sig) s 169 tools/finsig_dryos.c addMatch(fadr - fw->base_copied + fw->base2,s,f,sig); s 173 tools/finsig_dryos.c addMatch(fadr,s,f,sig); s 1474 tools/finsig_dryos.c int s = find_inst_rev(fw, isSTMFD_LR, k-1, 80); s 1476 tools/finsig_dryos.c if ((s >= 0) && (e >= 0)) s 1479 tools/finsig_dryos.c for (k1=s+1; k1<k-1; k1++) s 1504 tools/finsig_dryos.c fwAddMatch(fw,idx2adr(fw,s),32,0,122); s 4100 tools/finsig_dryos.c FuncSig *sig, *s; s 4161 tools/finsig_dryos.c for (s = sig; s->offs != 0xFFFFFFFF; s++) s 4163 tools/finsig_dryos.c if ((p[s->offs] & s->mask) != s->value) s 4172 tools/finsig_dryos.c if (s->mask == 0xFFFFFFFE) s 4177 tools/finsig_dryos.c if ((fw->buf[n->off+i+s->value] & 0x0F000000) == 0x0A000000) // B s 4179 tools/finsig_dryos.c idx = adr2idx(fw, followBranch2(fw, idx2adr(fw,n->off+i+s->value), 0xF0000001)); s 4189 tools/finsig_dryos.c s++; s 4190 tools/finsig_dryos.c for (; s->offs != 0xFFFFFFFF; s++) s 4192 tools/finsig_dryos.c if (!end_branch || (p1[s->offs] & s->mask) != s->value){ s 4220 tools/finsig_dryos.c for (s = sig; s->offs != 0xFFFFFFFF; s++) s 4222 tools/finsig_dryos.c if (isLDR_PC_cond(fw,n->off+i+s->offs)) s 4224 tools/finsig_dryos.c int m = adr2idx(fw,LDR2val(fw,n->off+i+s->offs)); s 4230 tools/finsig_dryos.c else if (isADR_PC_cond(fw,n->off+i+s->offs)) s 4232 tools/finsig_dryos.c int m = adr2idx(fw,ADR2adr(fw,n->off+i+s->offs)); s 4398 tools/finsig_dryos.c char *s = mode_name(*p); s 4400 tools/finsig_dryos.c if (strcmp(s,"") != 0) s 4401 tools/finsig_dryos.c bprintf(" (%s)",s); s 4673 tools/finsig_dryos.c int s = adr2idx(fw,fadr); s 4674 tools/finsig_dryos.c int e = find_inst(fw, isLDMFD_PC, s+1, 160); s 4675 tools/finsig_dryos.c for (k1=s+1; k1<s+16; k1++) s 4722 tools/finsig_dryos.c char *s = adr2ptr(fw,sadr); s 4723 tools/finsig_dryos.c if (((fw->cam != 0) && (strcmp(s,fw->cam) == 0)) || (strcmp(s,"Unknown") == 0)) s 7619 tools/finsig_dryos.c char *s = n; s 7622 tools/finsig_dryos.c s = malloc(strlen(n) + strlen(suffix) + 1); s 7623 tools/finsig_dryos.c sprintf(s, "%s%s", n, suffix); s 7628 tools/finsig_dryos.c if (strcmp(func_names[k].name, s) == 0) s 7634 tools/finsig_dryos.c if (s != n) free(s); s 7639 tools/finsig_dryos.c if (s != n) free(s); s 7645 tools/finsig_dryos.c func_names[next_func_entry].name = s; s 7657 tools/finsig_dryos.c char *s = malloc(strlen(n) + 3); s 7658 tools/finsig_dryos.c sprintf(s,"j_%s",n); s 7659 tools/finsig_dryos.c add_func_name(s, eadr, suffix); s 7950 tools/finsig_dryos.c char *s = adr2ptr(fw,sadr); s 7951 tools/finsig_dryos.c char *nm = malloc(strlen(s)+6); s 7952 tools/finsig_dryos.c sprintf(nm,"task_%s",s); s 811 tools/finsig_thumb2.c char *s = n; s 815 tools/finsig_thumb2.c s = malloc(strlen(n) + strlen(suffix) + 1); s 816 tools/finsig_thumb2.c sprintf(s, "%s%s", n, suffix); s 822 tools/finsig_thumb2.c printf("save_sig: refusing to save %s with out of range address 0x%08x\n",s,eadr); s 824 tools/finsig_thumb2.c free(s); s 831 tools/finsig_thumb2.c if (strcmp(sig_names[k].name, s) == 0) s 838 tools/finsig_thumb2.c free(s); s 844 tools/finsig_thumb2.c free(s); s 849 tools/finsig_thumb2.c printf("add_func_name: duplicate name %s existing 0x%08x != new 0x%08x\n",s, sig_names[k].val, eadr); s 854 tools/finsig_thumb2.c sig_names[next_sig_entry].name = s; s 156 tools/finsig_vxworks.c void addMatch(uint32_t fadr, int s, int f, int sig) s 159 tools/finsig_vxworks.c matches[count].success = s; s 166 tools/finsig_vxworks.c void fwAddMatch(firmware *fw, uint32_t fadr, int s, int f, int sig) s 170 tools/finsig_vxworks.c addMatch(fadr - fw->base_copied + fw->base2,s,f,sig); s 174 tools/finsig_vxworks.c addMatch(fadr,s,f,sig); s 3082 tools/finsig_vxworks.c FuncSig *sig, *s; s 3143 tools/finsig_vxworks.c for (s = sig; s->offs != 0xFFFFFFFF; s++) s 3145 tools/finsig_vxworks.c if ((p[s->offs] & s->mask) != s->value) s 3154 tools/finsig_vxworks.c if (s->mask == 0xFFFFFFFE) s 3159 tools/finsig_vxworks.c if ((fw->buf[n->off+i+s->value] & 0x0F000000) == 0x0A000000) // B s 3161 tools/finsig_vxworks.c idx = adr2idx(fw, followBranch2(fw, idx2adr(fw,n->off+i+s->value), 0xF0000001)); s 3171 tools/finsig_vxworks.c s++; s 3172 tools/finsig_vxworks.c for (; s->offs != 0xFFFFFFFF; s++) s 3174 tools/finsig_vxworks.c if (!end_branch || (p1[s->offs] & s->mask) != s->value){ s 3202 tools/finsig_vxworks.c for (s = sig; s->offs != 0xFFFFFFFF; s++) s 3204 tools/finsig_vxworks.c if (isLDR_PC_cond(fw,n->off+i+s->offs)) s 3206 tools/finsig_vxworks.c int m = adr2idx(fw,LDR2val(fw,n->off+i+s->offs)); s 3212 tools/finsig_vxworks.c else if (isADR_PC_cond(fw,n->off+i+s->offs)) s 3214 tools/finsig_vxworks.c int m = adr2idx(fw,ADR2adr(fw,n->off+i+s->offs)); s 3379 tools/finsig_vxworks.c char *s = mode_name(*p); s 3381 tools/finsig_vxworks.c if (strcmp(s,"") != 0) s 3382 tools/finsig_vxworks.c bprintf(" (%s)",s); s 3407 tools/finsig_vxworks.c char *s = mode_name(*p); s 3412 tools/finsig_vxworks.c if (strcmp(s,"") != 0) s 3413 tools/finsig_vxworks.c bprintf(" (%s)",s); s 3418 tools/finsig_vxworks.c char *s = mode_name((*p)&0xffff); s 3423 tools/finsig_vxworks.c if (strcmp(s,"") != 0) s 3424 tools/finsig_vxworks.c bprintf(" (%s)",s); s 3764 tools/finsig_vxworks.c char *s = adr2ptr(fw,sadr); s 3765 tools/finsig_vxworks.c if (((fw->cam != 0) && (strcmp(s,fw->cam) == 0)) || (strcmp(s,"Unknown") == 0)) s 5753 tools/finsig_vxworks.c char *s = n; s 5756 tools/finsig_vxworks.c s = malloc(strlen(n) + strlen(suffix) + 1); s 5757 tools/finsig_vxworks.c sprintf(s, "%s%s", n, suffix); s 5761 tools/finsig_vxworks.c if (strcmp(func_names[k].name, s) == 0) s 5768 tools/finsig_vxworks.c if (s != n) free(s); s 5772 tools/finsig_vxworks.c func_names[next_func_entry].name = s; s 5786 tools/finsig_vxworks.c char *s = malloc(strlen(n) + 3); s 5787 tools/finsig_vxworks.c sprintf(s,"j_%s",n); s 5788 tools/finsig_vxworks.c add_func_name(s, eadr, suffix); s 5986 tools/finsig_vxworks.c char *s = adr2ptr(fw,sadr); s 5988 tools/finsig_vxworks.c if ((isalnum(s[0])&&isalnum(s[1])) && (idx_valid(fw,adr2idx(fw,tadr)))) s 5990 tools/finsig_vxworks.c char *nm = malloc(strlen(s)+6); s 5991 tools/finsig_vxworks.c sprintf(nm,"task_%s",s); s 2243 tools/firmware_load_ng.c const char *s = (const char *)adr2ptr(fw,fw->dryos_ver_list[match_i]+strlen(sig)); s 2244 tools/firmware_load_ng.c fw->dryos_ver = atoi(s); s 2245 tools/firmware_load_ng.c if(s[4] == '+' && s[5] == 'p') { s 2246 tools/firmware_load_ng.c fw->dryos_ver_patch = atoi(s+6); s 28 tools/gen_conf_lua.c static char* get_str(char *s, char *d) s 30 tools/gen_conf_lua.c while ((*s == ' ') || (*s == '\t') || (*s == ',')) s++; s 31 tools/gen_conf_lua.c while (*s && (*s != ' ') && (*s != '\t') && (*s != ',') && (*s != '=') && (*s != ')')) s 33 tools/gen_conf_lua.c *d++ = *s++; s 35 tools/gen_conf_lua.c while (*s && (*s != ',') && (*s != '=') && (*s != ')')) s 37 tools/gen_conf_lua.c if (*s == '+') s 39 tools/gen_conf_lua.c *d++ = *s++; s 40 tools/gen_conf_lua.c while ((*s == ' ') || (*s == '\t') || (*s == ',')) s++; s 41 tools/gen_conf_lua.c while (*s && (*s != ' ') && (*s != '\t') && (*s != ',') && (*s != '=') && (*s != ')')) s 43 tools/gen_conf_lua.c *d++ = *s++; s 46 tools/gen_conf_lua.c else s++; s 49 tools/gen_conf_lua.c return s; s 79 tools/gen_conf_lua.c char *s; s 88 tools/gen_conf_lua.c s = strstr(line, "};"); s 89 tools/gen_conf_lua.c if (s != 0) break; s 92 tools/gen_conf_lua.c s = strstr(line, "CONF_INFO("); s 93 tools/gen_conf_lua.c if (s == 0) { off = 11; s = strstr(line, "CONF_INFO2("); } s 94 tools/gen_conf_lua.c if (s == 0) { off = 11; s = strstr(line, "CONF_INFOP("); } s 95 tools/gen_conf_lua.c if (s != 0) s 98 tools/gen_conf_lua.c if ((c == 0) || (c > s)) s 100 tools/gen_conf_lua.c s = get_str(s+off,val); s 101 tools/gen_conf_lua.c get_str(s,nm); s 117 tools/gen_conf_lua.c s = strstr(line, conf_name); s 118 tools/gen_conf_lua.c if (s != 0) found = 1; s 141 tools/ghidra_scripts/datatypes/fw_functions.h __stdcall int strlen(const char *s); s 144 tools/ghidra_scripts/datatypes/fw_functions.h __stdcall char * strchr(const char *s, int c); s 148 tools/ghidra_scripts/datatypes/fw_functions.h __stdcall char * strrchr(const char *s, int c); s 149 tools/ghidra_scripts/datatypes/fw_functions.h __stdcall char * strpbrk(const char *s, const char *accept); s 174 tools/ghidra_scripts/datatypes/fw_functions.h __stdcall void * memchr(const void *s, int c, int n); s 176 tools/ghidra_scripts/datatypes/fw_functions.h __stdcall void * memset(void *s, int c, int n); s 251 tools/ghidra_scripts/datatypes/fw_functions.h __stdcall int strftime(char *s, unsigned int maxsize, const char *format, const /*struct tm*/ void *timp); s 76 tools/makelang.c char *s = strrchr(lng_filename,'/'); s 77 tools/makelang.c if (s == 0) s = lng_filename; else s++; s 78 tools/makelang.c strcpy(buf,s); s 79 tools/makelang.c s = strrchr(buf,'.'); s 80 tools/makelang.c if (s) *s = 0; s 140 tools/makelang.c char *p, *s, *e; s 168 tools/makelang.c s = p; s 172 tools/makelang.c langfile[i]=s; // add string s 73 tools/packfi2/deflate.c typedef block_state (*compress_func) OF((deflate_state *s, int flush)); s 76 tools/packfi2/deflate.c local void fill_window OF((deflate_state *s)); s 77 tools/packfi2/deflate.c local block_state deflate_stored OF((deflate_state *s, int flush)); s 78 tools/packfi2/deflate.c local block_state deflate_fast OF((deflate_state *s, int flush)); s 80 tools/packfi2/deflate.c local block_state deflate_slow OF((deflate_state *s, int flush)); s 82 tools/packfi2/deflate.c local void lm_init OF((deflate_state *s)); s 83 tools/packfi2/deflate.c local void putShortMSB OF((deflate_state *s, uInt b)); s 89 tools/packfi2/deflate.c uInt longest_match OF((deflate_state *s, IPos cur_match)); s 91 tools/packfi2/deflate.c local uInt longest_match OF((deflate_state *s, IPos cur_match)); s 94 tools/packfi2/deflate.c local uInt longest_match_fast OF((deflate_state *s, IPos cur_match)); s 97 tools/packfi2/deflate.c local void check_match OF((deflate_state *s, IPos start, IPos match, s 170 tools/packfi2/deflate.c #define UPDATE_HASH(s,h,c) (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask) s 184 tools/packfi2/deflate.c #define INSERT_STRING(s, str, match_head) \ s 185 tools/packfi2/deflate.c (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ s 186 tools/packfi2/deflate.c match_head = s->head[s->ins_h], \ s 187 tools/packfi2/deflate.c s->head[s->ins_h] = (Pos)(str)) s 189 tools/packfi2/deflate.c #define INSERT_STRING(s, str, match_head) \ s 190 tools/packfi2/deflate.c (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ s 191 tools/packfi2/deflate.c match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \ s 192 tools/packfi2/deflate.c s->head[s->ins_h] = (Pos)(str)) s 199 tools/packfi2/deflate.c #define CLEAR_HASH(s) \ s 200 tools/packfi2/deflate.c s->head[s->hash_size-1] = NIL; \ s 201 tools/packfi2/deflate.c zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); s 227 tools/packfi2/deflate.c deflate_state *s; s 271 tools/packfi2/deflate.c s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state)); s 272 tools/packfi2/deflate.c if (s == Z_NULL) return Z_MEM_ERROR; s 273 tools/packfi2/deflate.c strm->state = (struct internal_state FAR *)s; s 274 tools/packfi2/deflate.c s->strm = strm; s 276 tools/packfi2/deflate.c s->wrap = wrap; s 277 tools/packfi2/deflate.c s->gzhead = Z_NULL; s 278 tools/packfi2/deflate.c s->w_bits = windowBits; s 279 tools/packfi2/deflate.c s->w_size = 1 << s->w_bits; s 280 tools/packfi2/deflate.c s->w_mask = s->w_size - 1; s 282 tools/packfi2/deflate.c s->hash_bits = memLevel + 7; s 283 tools/packfi2/deflate.c s->hash_size = 1 << s->hash_bits; s 284 tools/packfi2/deflate.c s->hash_mask = s->hash_size - 1; s 285 tools/packfi2/deflate.c s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH); s 287 tools/packfi2/deflate.c s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte)); s 288 tools/packfi2/deflate.c s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos)); s 289 tools/packfi2/deflate.c s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos)); s 291 tools/packfi2/deflate.c s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ s 293 tools/packfi2/deflate.c overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); s 294 tools/packfi2/deflate.c s->pending_buf = (uchf *) overlay; s 295 tools/packfi2/deflate.c s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L); s 297 tools/packfi2/deflate.c if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || s 298 tools/packfi2/deflate.c s->pending_buf == Z_NULL) { s 299 tools/packfi2/deflate.c s->status = FINISH_STATE; s 304 tools/packfi2/deflate.c s->d_buf = overlay + s->lit_bufsize/sizeof(ush); s 305 tools/packfi2/deflate.c s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; s 307 tools/packfi2/deflate.c s->level = level; s 308 tools/packfi2/deflate.c s->strategy = strategy; s 309 tools/packfi2/deflate.c s->method = (Byte)method; s 320 tools/packfi2/deflate.c deflate_state *s; s 330 tools/packfi2/deflate.c s = strm->state; s 331 tools/packfi2/deflate.c if (s->wrap) s 335 tools/packfi2/deflate.c if (length > MAX_DIST(s)) { s 336 tools/packfi2/deflate.c length = MAX_DIST(s); s 339 tools/packfi2/deflate.c zmemcpy(s->window, dictionary, length); s 340 tools/packfi2/deflate.c s->strstart = length; s 341 tools/packfi2/deflate.c s->block_start = (long)length; s 347 tools/packfi2/deflate.c s->ins_h = s->window[0]; s 348 tools/packfi2/deflate.c UPDATE_HASH(s, s->ins_h, s->window[1]); s 350 tools/packfi2/deflate.c INSERT_STRING(s, n, hash_head); s 360 tools/packfi2/deflate.c deflate_state *s; s 371 tools/packfi2/deflate.c s = (deflate_state *)strm->state; s 372 tools/packfi2/deflate.c s->pending = 0; s 373 tools/packfi2/deflate.c s->pending_out = s->pending_buf; s 375 tools/packfi2/deflate.c if (s->wrap < 0) { s 376 tools/packfi2/deflate.c s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */ s 378 tools/packfi2/deflate.c s->status = s->wrap ? INIT_STATE : BUSY_STATE; s 381 tools/packfi2/deflate.c s->wrap == 2 ? crc32(0L, Z_NULL, 0) : s 384 tools/packfi2/deflate.c s->last_flush = Z_NO_FLUSH; s 386 tools/packfi2/deflate.c _tr_init(s); s 387 tools/packfi2/deflate.c lm_init(s); s 421 tools/packfi2/deflate.c deflate_state *s; s 426 tools/packfi2/deflate.c s = strm->state; s 436 tools/packfi2/deflate.c func = configuration_table[s->level].func; s 442 tools/packfi2/deflate.c if (s->level != level) { s 443 tools/packfi2/deflate.c s->level = level; s 444 tools/packfi2/deflate.c s->max_lazy_match = configuration_table[level].max_lazy; s 445 tools/packfi2/deflate.c s->good_match = configuration_table[level].good_length; s 446 tools/packfi2/deflate.c s->nice_match = configuration_table[level].nice_length; s 447 tools/packfi2/deflate.c s->max_chain_length = configuration_table[level].max_chain; s 449 tools/packfi2/deflate.c s->strategy = strategy; s 461 tools/packfi2/deflate.c deflate_state *s; s 464 tools/packfi2/deflate.c s = strm->state; s 465 tools/packfi2/deflate.c s->good_match = good_length; s 466 tools/packfi2/deflate.c s->max_lazy_match = max_lazy; s 467 tools/packfi2/deflate.c s->nice_match = nice_length; s 468 tools/packfi2/deflate.c s->max_chain_length = max_chain; s 493 tools/packfi2/deflate.c deflate_state *s; s 505 tools/packfi2/deflate.c s = strm->state; s 506 tools/packfi2/deflate.c if (s->w_bits != 15 || s->hash_bits != 8 + 7) s 518 tools/packfi2/deflate.c local void putShortMSB (s, b) s 519 tools/packfi2/deflate.c deflate_state *s; s 522 tools/packfi2/deflate.c put_byte(s, (Byte)(b >> 8)); s 523 tools/packfi2/deflate.c put_byte(s, (Byte)(b & 0xff)); s 557 tools/packfi2/deflate.c deflate_state *s; s 563 tools/packfi2/deflate.c s = strm->state; s 567 tools/packfi2/deflate.c (s->status == FINISH_STATE && flush != Z_FINISH)) { s 572 tools/packfi2/deflate.c s->strm = strm; /* just in case */ s 573 tools/packfi2/deflate.c old_flush = s->last_flush; s 574 tools/packfi2/deflate.c s->last_flush = flush; s 577 tools/packfi2/deflate.c if (s->status == INIT_STATE) { s 579 tools/packfi2/deflate.c if (s->wrap == 2) { s 581 tools/packfi2/deflate.c put_byte(s, 31); s 582 tools/packfi2/deflate.c put_byte(s, 139); s 583 tools/packfi2/deflate.c put_byte(s, 8); s 584 tools/packfi2/deflate.c if (s->gzhead == NULL) { s 585 tools/packfi2/deflate.c put_byte(s, 0); s 586 tools/packfi2/deflate.c put_byte(s, 0); s 587 tools/packfi2/deflate.c put_byte(s, 0); s 588 tools/packfi2/deflate.c put_byte(s, 0); s 589 tools/packfi2/deflate.c put_byte(s, 0); s 590 tools/packfi2/deflate.c put_byte(s, s->level == 9 ? 2 : s 591 tools/packfi2/deflate.c (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? s 593 tools/packfi2/deflate.c put_byte(s, OS_CODE); s 594 tools/packfi2/deflate.c s->status = BUSY_STATE; s 597 tools/packfi2/deflate.c put_byte(s, (s->gzhead->text ? 1 : 0) + s 598 tools/packfi2/deflate.c (s->gzhead->hcrc ? 2 : 0) + s 599 tools/packfi2/deflate.c (s->gzhead->extra == Z_NULL ? 0 : 4) + s 600 tools/packfi2/deflate.c (s->gzhead->name == Z_NULL ? 0 : 8) + s 601 tools/packfi2/deflate.c (s->gzhead->comment == Z_NULL ? 0 : 16) s 603 tools/packfi2/deflate.c put_byte(s, (Byte)(s->gzhead->time & 0xff)); s 604 tools/packfi2/deflate.c put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff)); s 605 tools/packfi2/deflate.c put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff)); s 606 tools/packfi2/deflate.c put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff)); s 607 tools/packfi2/deflate.c put_byte(s, s->level == 9 ? 2 : s 608 tools/packfi2/deflate.c (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? s 610 tools/packfi2/deflate.c put_byte(s, s->gzhead->os & 0xff); s 611 tools/packfi2/deflate.c if (s->gzhead->extra != NULL) { s 612 tools/packfi2/deflate.c put_byte(s, s->gzhead->extra_len & 0xff); s 613 tools/packfi2/deflate.c put_byte(s, (s->gzhead->extra_len >> 8) & 0xff); s 615 tools/packfi2/deflate.c if (s->gzhead->hcrc) s 616 tools/packfi2/deflate.c strm->adler = crc32(strm->adler, s->pending_buf, s 617 tools/packfi2/deflate.c s->pending); s 618 tools/packfi2/deflate.c s->gzindex = 0; s 619 tools/packfi2/deflate.c s->status = EXTRA_STATE; s 625 tools/packfi2/deflate.c uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8; s 628 tools/packfi2/deflate.c if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2) s 630 tools/packfi2/deflate.c else if (s->level < 6) s 632 tools/packfi2/deflate.c else if (s->level == 6) s 637 tools/packfi2/deflate.c if (s->strstart != 0) header |= PRESET_DICT; s 640 tools/packfi2/deflate.c s->status = BUSY_STATE; s 641 tools/packfi2/deflate.c putShortMSB(s, header); s 644 tools/packfi2/deflate.c if (s->strstart != 0) { s 645 tools/packfi2/deflate.c putShortMSB(s, (uInt)(strm->adler >> 16)); s 646 tools/packfi2/deflate.c putShortMSB(s, (uInt)(strm->adler & 0xffff)); s 652 tools/packfi2/deflate.c if (s->status == EXTRA_STATE) { s 653 tools/packfi2/deflate.c if (s->gzhead->extra != NULL) { s 654 tools/packfi2/deflate.c uInt beg = s->pending; /* start of bytes to update crc */ s 656 tools/packfi2/deflate.c while (s->gzindex < (s->gzhead->extra_len & 0xffff)) { s 657 tools/packfi2/deflate.c if (s->pending == s->pending_buf_size) { s 658 tools/packfi2/deflate.c if (s->gzhead->hcrc && s->pending > beg) s 659 tools/packfi2/deflate.c strm->adler = crc32(strm->adler, s->pending_buf + beg, s 660 tools/packfi2/deflate.c s->pending - beg); s 662 tools/packfi2/deflate.c beg = s->pending; s 663 tools/packfi2/deflate.c if (s->pending == s->pending_buf_size) s 666 tools/packfi2/deflate.c put_byte(s, s->gzhead->extra[s->gzindex]); s 667 tools/packfi2/deflate.c s->gzindex++; s 669 tools/packfi2/deflate.c if (s->gzhead->hcrc && s->pending > beg) s 670 tools/packfi2/deflate.c strm->adler = crc32(strm->adler, s->pending_buf + beg, s 671 tools/packfi2/deflate.c s->pending - beg); s 672 tools/packfi2/deflate.c if (s->gzindex == s->gzhead->extra_len) { s 673 tools/packfi2/deflate.c s->gzindex = 0; s 674 tools/packfi2/deflate.c s->status = NAME_STATE; s 678 tools/packfi2/deflate.c s->status = NAME_STATE; s 680 tools/packfi2/deflate.c if (s->status == NAME_STATE) { s 681 tools/packfi2/deflate.c if (s->gzhead->name != NULL) { s 682 tools/packfi2/deflate.c uInt beg = s->pending; /* start of bytes to update crc */ s 686 tools/packfi2/deflate.c if (s->pending == s->pending_buf_size) { s 687 tools/packfi2/deflate.c if (s->gzhead->hcrc && s->pending > beg) s 688 tools/packfi2/deflate.c strm->adler = crc32(strm->adler, s->pending_buf + beg, s 689 tools/packfi2/deflate.c s->pending - beg); s 691 tools/packfi2/deflate.c beg = s->pending; s 692 tools/packfi2/deflate.c if (s->pending == s->pending_buf_size) { s 697 tools/packfi2/deflate.c val = s->gzhead->name[s->gzindex++]; s 698 tools/packfi2/deflate.c put_byte(s, val); s 700 tools/packfi2/deflate.c if (s->gzhead->hcrc && s->pending > beg) s 701 tools/packfi2/deflate.c strm->adler = crc32(strm->adler, s->pending_buf + beg, s 702 tools/packfi2/deflate.c s->pending - beg); s 704 tools/packfi2/deflate.c s->gzindex = 0; s 705 tools/packfi2/deflate.c s->status = COMMENT_STATE; s 709 tools/packfi2/deflate.c s->status = COMMENT_STATE; s 711 tools/packfi2/deflate.c if (s->status == COMMENT_STATE) { s 712 tools/packfi2/deflate.c if (s->gzhead->comment != NULL) { s 713 tools/packfi2/deflate.c uInt beg = s->pending; /* start of bytes to update crc */ s 717 tools/packfi2/deflate.c if (s->pending == s->pending_buf_size) { s 718 tools/packfi2/deflate.c if (s->gzhead->hcrc && s->pending > beg) s 719 tools/packfi2/deflate.c strm->adler = crc32(strm->adler, s->pending_buf + beg, s 720 tools/packfi2/deflate.c s->pending - beg); s 722 tools/packfi2/deflate.c beg = s->pending; s 723 tools/packfi2/deflate.c if (s->pending == s->pending_buf_size) { s 728 tools/packfi2/deflate.c val = s->gzhead->comment[s->gzindex++]; s 729 tools/packfi2/deflate.c put_byte(s, val); s 731 tools/packfi2/deflate.c if (s->gzhead->hcrc && s->pending > beg) s 732 tools/packfi2/deflate.c strm->adler = crc32(strm->adler, s->pending_buf + beg, s 733 tools/packfi2/deflate.c s->pending - beg); s 735 tools/packfi2/deflate.c s->status = HCRC_STATE; s 738 tools/packfi2/deflate.c s->status = HCRC_STATE; s 740 tools/packfi2/deflate.c if (s->status == HCRC_STATE) { s 741 tools/packfi2/deflate.c if (s->gzhead->hcrc) { s 742 tools/packfi2/deflate.c if (s->pending + 2 > s->pending_buf_size) s 744 tools/packfi2/deflate.c if (s->pending + 2 <= s->pending_buf_size) { s 745 tools/packfi2/deflate.c put_byte(s, (Byte)(strm->adler & 0xff)); s 746 tools/packfi2/deflate.c put_byte(s, (Byte)((strm->adler >> 8) & 0xff)); s 748 tools/packfi2/deflate.c s->status = BUSY_STATE; s 752 tools/packfi2/deflate.c s->status = BUSY_STATE; s 757 tools/packfi2/deflate.c if (s->pending != 0) { s 766 tools/packfi2/deflate.c s->last_flush = -1; s 780 tools/packfi2/deflate.c if (s->status == FINISH_STATE && strm->avail_in != 0) { s 786 tools/packfi2/deflate.c if (strm->avail_in != 0 || s->lookahead != 0 || s 787 tools/packfi2/deflate.c (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) { s 790 tools/packfi2/deflate.c bstate = (*(configuration_table[s->level].func))(s, flush); s 793 tools/packfi2/deflate.c s->status = FINISH_STATE; s 797 tools/packfi2/deflate.c s->last_flush = -1; /* avoid BUF_ERROR next call, see above */ s 810 tools/packfi2/deflate.c _tr_align(s); s 812 tools/packfi2/deflate.c _tr_stored_block(s, (char*)0, 0L, 0); s 817 tools/packfi2/deflate.c CLEAR_HASH(s); /* forget history */ s 822 tools/packfi2/deflate.c s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */ s 830 tools/packfi2/deflate.c if (s->wrap <= 0) return Z_STREAM_END; s 834 tools/packfi2/deflate.c if (s->wrap == 2) { s 835 tools/packfi2/deflate.c put_byte(s, (Byte)(strm->adler & 0xff)); s 836 tools/packfi2/deflate.c put_byte(s, (Byte)((strm->adler >> 8) & 0xff)); s 837 tools/packfi2/deflate.c put_byte(s, (Byte)((strm->adler >> 16) & 0xff)); s 838 tools/packfi2/deflate.c put_byte(s, (Byte)((strm->adler >> 24) & 0xff)); s 839 tools/packfi2/deflate.c put_byte(s, (Byte)(strm->total_in & 0xff)); s 840 tools/packfi2/deflate.c put_byte(s, (Byte)((strm->total_in >> 8) & 0xff)); s 841 tools/packfi2/deflate.c put_byte(s, (Byte)((strm->total_in >> 16) & 0xff)); s 842 tools/packfi2/deflate.c put_byte(s, (Byte)((strm->total_in >> 24) & 0xff)); s 847 tools/packfi2/deflate.c putShortMSB(s, (uInt)(strm->adler >> 16)); s 848 tools/packfi2/deflate.c putShortMSB(s, (uInt)(strm->adler & 0xffff)); s 854 tools/packfi2/deflate.c if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */ s 855 tools/packfi2/deflate.c return s->pending != 0 ? Z_OK : Z_STREAM_END; s 986 tools/packfi2/deflate.c local void lm_init (s) s 987 tools/packfi2/deflate.c deflate_state *s; s 989 tools/packfi2/deflate.c s->window_size = (ulg)2L*s->w_size; s 991 tools/packfi2/deflate.c CLEAR_HASH(s); s 995 tools/packfi2/deflate.c s->max_lazy_match = configuration_table[s->level].max_lazy; s 996 tools/packfi2/deflate.c s->good_match = configuration_table[s->level].good_length; s 997 tools/packfi2/deflate.c s->nice_match = configuration_table[s->level].nice_length; s 998 tools/packfi2/deflate.c s->max_chain_length = configuration_table[s->level].max_chain; s 1000 tools/packfi2/deflate.c s->strstart = 0; s 1001 tools/packfi2/deflate.c s->block_start = 0L; s 1002 tools/packfi2/deflate.c s->lookahead = 0; s 1003 tools/packfi2/deflate.c s->match_length = s->prev_length = MIN_MATCH-1; s 1004 tools/packfi2/deflate.c s->match_available = 0; s 1005 tools/packfi2/deflate.c s->ins_h = 0; s 1027 tools/packfi2/deflate.c local uInt longest_match(s, cur_match) s 1028 tools/packfi2/deflate.c deflate_state *s; s 1031 tools/packfi2/deflate.c unsigned chain_length = s->max_chain_length;/* max hash chain length */ s 1032 tools/packfi2/deflate.c register Bytef *scan = s->window + s->strstart; /* current string */ s 1035 tools/packfi2/deflate.c int best_len = s->prev_length; /* best match length so far */ s 1036 tools/packfi2/deflate.c int nice_match = s->nice_match; /* stop if match long enough */ s 1037 tools/packfi2/deflate.c IPos limit = s->strstart > (IPos)MAX_DIST(s) ? s 1038 tools/packfi2/deflate.c s->strstart - (IPos)MAX_DIST(s) : NIL; s 1042 tools/packfi2/deflate.c Posf *prev = s->prev; s 1043 tools/packfi2/deflate.c uInt wmask = s->w_mask; s 1049 tools/packfi2/deflate.c register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; s 1053 tools/packfi2/deflate.c register Bytef *strend = s->window + s->strstart + MAX_MATCH; s 1061 tools/packfi2/deflate.c Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); s 1064 tools/packfi2/deflate.c if (s->prev_length >= s->good_match) { s 1070 tools/packfi2/deflate.c if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; s 1072 tools/packfi2/deflate.c Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); s 1075 tools/packfi2/deflate.c Assert(cur_match < s->strstart, "no future"); s 1076 tools/packfi2/deflate.c match = s->window + cur_match; s 1113 tools/packfi2/deflate.c Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); s 1145 tools/packfi2/deflate.c Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); s 1153 tools/packfi2/deflate.c s->match_start = cur_match; s 1166 tools/packfi2/deflate.c if ((uInt)best_len <= s->lookahead) return (uInt)best_len; s 1167 tools/packfi2/deflate.c return s->lookahead; s 1175 tools/packfi2/deflate.c local uInt longest_match_fast(s, cur_match) s 1176 tools/packfi2/deflate.c deflate_state *s; s 1179 tools/packfi2/deflate.c register Bytef *scan = s->window + s->strstart; /* current string */ s 1182 tools/packfi2/deflate.c register Bytef *strend = s->window + s->strstart + MAX_MATCH; s 1187 tools/packfi2/deflate.c Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); s 1189 tools/packfi2/deflate.c Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); s 1191 tools/packfi2/deflate.c Assert(cur_match < s->strstart, "no future"); s 1193 tools/packfi2/deflate.c match = s->window + cur_match; s 1218 tools/packfi2/deflate.c Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); s 1224 tools/packfi2/deflate.c s->match_start = cur_match; s 1225 tools/packfi2/deflate.c return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead; s 1232 tools/packfi2/deflate.c local void check_match(s, start, match, length) s 1233 tools/packfi2/deflate.c deflate_state *s; s 1238 tools/packfi2/deflate.c if (zmemcmp(s->window + match, s 1239 tools/packfi2/deflate.c s->window + start, length) != EQUAL) { s 1243 tools/packfi2/deflate.c fprintf(stderr, "%c%c", s->window[match++], s->window[start++]); s 1249 tools/packfi2/deflate.c do { putc(s->window[start++], stderr); } while (--length != 0); s 1253 tools/packfi2/deflate.c # define check_match(s, start, match, length) s 1266 tools/packfi2/deflate.c local void fill_window(s) s 1267 tools/packfi2/deflate.c deflate_state *s; s 1272 tools/packfi2/deflate.c uInt wsize = s->w_size; s 1275 tools/packfi2/deflate.c more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart); s 1279 tools/packfi2/deflate.c if (more == 0 && s->strstart == 0 && s->lookahead == 0) { s 1293 tools/packfi2/deflate.c if (s->strstart >= wsize+MAX_DIST(s)) { s 1295 tools/packfi2/deflate.c zmemcpy(s->window, s->window+wsize, (unsigned)wsize); s 1296 tools/packfi2/deflate.c s->match_start -= wsize; s 1297 tools/packfi2/deflate.c s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ s 1298 tools/packfi2/deflate.c s->block_start -= (long) wsize; s 1307 tools/packfi2/deflate.c n = s->hash_size; s 1308 tools/packfi2/deflate.c p = &s->head[n]; s 1316 tools/packfi2/deflate.c p = &s->prev[n]; s 1327 tools/packfi2/deflate.c if (s->strm->avail_in == 0) return; s 1342 tools/packfi2/deflate.c n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more); s 1343 tools/packfi2/deflate.c s->lookahead += n; s 1346 tools/packfi2/deflate.c if (s->lookahead >= MIN_MATCH) { s 1347 tools/packfi2/deflate.c s->ins_h = s->window[s->strstart]; s 1348 tools/packfi2/deflate.c UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]); s 1357 tools/packfi2/deflate.c } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); s 1364 tools/packfi2/deflate.c #define FLUSH_BLOCK_ONLY(s, eof) { \ s 1365 tools/packfi2/deflate.c _tr_flush_block(s, (s->block_start >= 0L ? \ s 1366 tools/packfi2/deflate.c (charf *)&s->window[(unsigned)s->block_start] : \ s 1368 tools/packfi2/deflate.c (ulg)((long)s->strstart - s->block_start), \ s 1370 tools/packfi2/deflate.c s->block_start = s->strstart; \ s 1371 tools/packfi2/deflate.c flush_pending(s->strm); \ s 1376 tools/packfi2/deflate.c #define FLUSH_BLOCK(s, eof) { \ s 1377 tools/packfi2/deflate.c FLUSH_BLOCK_ONLY(s, eof); \ s 1378 tools/packfi2/deflate.c if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \ s 1390 tools/packfi2/deflate.c local block_state deflate_stored(s, flush) s 1391 tools/packfi2/deflate.c deflate_state *s; s 1400 tools/packfi2/deflate.c if (max_block_size > s->pending_buf_size - 5) { s 1401 tools/packfi2/deflate.c max_block_size = s->pending_buf_size - 5; s 1407 tools/packfi2/deflate.c if (s->lookahead <= 1) { s 1409 tools/packfi2/deflate.c Assert(s->strstart < s->w_size+MAX_DIST(s) || s 1410 tools/packfi2/deflate.c s->block_start >= (long)s->w_size, "slide too late"); s 1412 tools/packfi2/deflate.c fill_window(s); s 1413 tools/packfi2/deflate.c if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more; s 1415 tools/packfi2/deflate.c if (s->lookahead == 0) break; /* flush the current block */ s 1417 tools/packfi2/deflate.c Assert(s->block_start >= 0L, "block gone"); s 1419 tools/packfi2/deflate.c s->strstart += s->lookahead; s 1420 tools/packfi2/deflate.c s->lookahead = 0; s 1423 tools/packfi2/deflate.c max_start = s->block_start + max_block_size; s 1424 tools/packfi2/deflate.c if (s->strstart == 0 || (ulg)s->strstart >= max_start) { s 1426 tools/packfi2/deflate.c s->lookahead = (uInt)(s->strstart - max_start); s 1427 tools/packfi2/deflate.c s->strstart = (uInt)max_start; s 1428 tools/packfi2/deflate.c FLUSH_BLOCK(s, 0); s 1433 tools/packfi2/deflate.c if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) { s 1434 tools/packfi2/deflate.c FLUSH_BLOCK(s, 0); s 1437 tools/packfi2/deflate.c FLUSH_BLOCK(s, flush == Z_FINISH); s 1448 tools/packfi2/deflate.c local block_state deflate_fast(s, flush) s 1449 tools/packfi2/deflate.c deflate_state *s; s 1461 tools/packfi2/deflate.c if (s->lookahead < MIN_LOOKAHEAD) { s 1462 tools/packfi2/deflate.c fill_window(s); s 1463 tools/packfi2/deflate.c if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { s 1466 tools/packfi2/deflate.c if (s->lookahead == 0) break; /* flush the current block */ s 1472 tools/packfi2/deflate.c if (s->lookahead >= MIN_MATCH) { s 1473 tools/packfi2/deflate.c INSERT_STRING(s, s->strstart, hash_head); s 1479 tools/packfi2/deflate.c if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) { s 1485 tools/packfi2/deflate.c if ((s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) || s 1486 tools/packfi2/deflate.c (s->strategy == Z_RLE && s->strstart - hash_head == 1)) { s 1487 tools/packfi2/deflate.c s->match_length = longest_match_fast (s, hash_head); s 1490 tools/packfi2/deflate.c if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) { s 1491 tools/packfi2/deflate.c s->match_length = longest_match (s, hash_head); s 1492 tools/packfi2/deflate.c } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) { s 1493 tools/packfi2/deflate.c s->match_length = longest_match_fast (s, hash_head); s 1498 tools/packfi2/deflate.c if (s->match_length >= MIN_MATCH) { s 1499 tools/packfi2/deflate.c check_match(s, s->strstart, s->match_start, s->match_length); s 1501 tools/packfi2/deflate.c _tr_tally_dist(s, s->strstart - s->match_start, s 1502 tools/packfi2/deflate.c s->match_length - MIN_MATCH, bflush); s 1504 tools/packfi2/deflate.c s->lookahead -= s->match_length; s 1510 tools/packfi2/deflate.c if (s->match_length <= s->max_insert_length && s 1511 tools/packfi2/deflate.c s->lookahead >= MIN_MATCH) { s 1512 tools/packfi2/deflate.c s->match_length--; /* string at strstart already in table */ s 1514 tools/packfi2/deflate.c s->strstart++; s 1515 tools/packfi2/deflate.c INSERT_STRING(s, s->strstart, hash_head); s 1519 tools/packfi2/deflate.c } while (--s->match_length != 0); s 1520 tools/packfi2/deflate.c s->strstart++; s 1524 tools/packfi2/deflate.c s->strstart += s->match_length; s 1525 tools/packfi2/deflate.c s->match_length = 0; s 1526 tools/packfi2/deflate.c s->ins_h = s->window[s->strstart]; s 1527 tools/packfi2/deflate.c UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]); s 1537 tools/packfi2/deflate.c Tracevv((stderr,"%c", s->window[s->strstart])); s 1538 tools/packfi2/deflate.c _tr_tally_lit (s, s->window[s->strstart], bflush); s 1539 tools/packfi2/deflate.c s->lookahead--; s 1540 tools/packfi2/deflate.c s->strstart++; s 1542 tools/packfi2/deflate.c if (bflush) FLUSH_BLOCK(s, 0); s 1544 tools/packfi2/deflate.c FLUSH_BLOCK(s, flush == Z_FINISH); s 1554 tools/packfi2/deflate.c local block_state deflate_slow(s, flush) s 1555 tools/packfi2/deflate.c deflate_state *s; s 1568 tools/packfi2/deflate.c if (s->lookahead < MIN_LOOKAHEAD) { s 1569 tools/packfi2/deflate.c fill_window(s); s 1570 tools/packfi2/deflate.c if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { s 1573 tools/packfi2/deflate.c if (s->lookahead == 0) break; /* flush the current block */ s 1579 tools/packfi2/deflate.c if (s->lookahead >= MIN_MATCH) { s 1580 tools/packfi2/deflate.c INSERT_STRING(s, s->strstart, hash_head); s 1585 tools/packfi2/deflate.c s->prev_length = s->match_length, s->prev_match = s->match_start; s 1586 tools/packfi2/deflate.c s->match_length = MIN_MATCH-1; s 1588 tools/packfi2/deflate.c if (hash_head != NIL && s->prev_length < s->max_lazy_match && s 1589 tools/packfi2/deflate.c s->strstart - hash_head <= MAX_DIST(s)) { s 1594 tools/packfi2/deflate.c if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) { s 1595 tools/packfi2/deflate.c s->match_length = longest_match (s, hash_head); s 1596 tools/packfi2/deflate.c } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) { s 1597 tools/packfi2/deflate.c s->match_length = longest_match_fast (s, hash_head); s 1601 tools/packfi2/deflate.c if (s->match_length <= 5 && (s->strategy == Z_FILTERED s 1603 tools/packfi2/deflate.c || (s->match_length == MIN_MATCH && s 1604 tools/packfi2/deflate.c s->strstart - s->match_start > TOO_FAR) s 1611 tools/packfi2/deflate.c s->match_length = MIN_MATCH-1; s 1617 tools/packfi2/deflate.c if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) { s 1618 tools/packfi2/deflate.c uInt max_insert = s->strstart + s->lookahead - MIN_MATCH; s 1621 tools/packfi2/deflate.c check_match(s, s->strstart-1, s->prev_match, s->prev_length); s 1623 tools/packfi2/deflate.c _tr_tally_dist(s, s->strstart -1 - s->prev_match, s 1624 tools/packfi2/deflate.c s->prev_length - MIN_MATCH, bflush); s 1631 tools/packfi2/deflate.c s->lookahead -= s->prev_length-1; s 1632 tools/packfi2/deflate.c s->prev_length -= 2; s 1634 tools/packfi2/deflate.c if (++s->strstart <= max_insert) { s 1635 tools/packfi2/deflate.c INSERT_STRING(s, s->strstart, hash_head); s 1637 tools/packfi2/deflate.c } while (--s->prev_length != 0); s 1638 tools/packfi2/deflate.c s->match_available = 0; s 1639 tools/packfi2/deflate.c s->match_length = MIN_MATCH-1; s 1640 tools/packfi2/deflate.c s->strstart++; s 1642 tools/packfi2/deflate.c if (bflush) FLUSH_BLOCK(s, 0); s 1644 tools/packfi2/deflate.c } else if (s->match_available) { s 1649 tools/packfi2/deflate.c Tracevv((stderr,"%c", s->window[s->strstart-1])); s 1650 tools/packfi2/deflate.c _tr_tally_lit(s, s->window[s->strstart-1], bflush); s 1652 tools/packfi2/deflate.c FLUSH_BLOCK_ONLY(s, 0); s 1654 tools/packfi2/deflate.c s->strstart++; s 1655 tools/packfi2/deflate.c s->lookahead--; s 1656 tools/packfi2/deflate.c if (s->strm->avail_out == 0) return need_more; s 1661 tools/packfi2/deflate.c s->match_available = 1; s 1662 tools/packfi2/deflate.c s->strstart++; s 1663 tools/packfi2/deflate.c s->lookahead--; s 1667 tools/packfi2/deflate.c if (s->match_available) { s 1668 tools/packfi2/deflate.c Tracevv((stderr,"%c", s->window[s->strstart-1])); s 1669 tools/packfi2/deflate.c _tr_tally_lit(s, s->window[s->strstart-1], bflush); s 1670 tools/packfi2/deflate.c s->match_available = 0; s 1672 tools/packfi2/deflate.c FLUSH_BLOCK(s, flush == Z_FINISH); s 1683 tools/packfi2/deflate.c local block_state deflate_rle(s, flush) s 1684 tools/packfi2/deflate.c deflate_state *s; s 1698 tools/packfi2/deflate.c if (s->lookahead < MAX_MATCH) { s 1699 tools/packfi2/deflate.c fill_window(s); s 1700 tools/packfi2/deflate.c if (s->lookahead < MAX_MATCH && flush == Z_NO_FLUSH) { s 1703 tools/packfi2/deflate.c if (s->lookahead == 0) break; /* flush the current block */ s 1708 tools/packfi2/deflate.c if (s->strstart > 0) { /* if there is a previous byte, that is */ s 1709 tools/packfi2/deflate.c max = s->lookahead < MAX_MATCH ? s->lookahead : MAX_MATCH; s 1710 tools/packfi2/deflate.c scan = s->window + s->strstart - 1; s 1720 tools/packfi2/deflate.c check_match(s, s->strstart, s->strstart - 1, run); s 1721 tools/packfi2/deflate.c _tr_tally_dist(s, 1, run - MIN_MATCH, bflush); s 1722 tools/packfi2/deflate.c s->lookahead -= run; s 1723 tools/packfi2/deflate.c s->strstart += run; s 1726 tools/packfi2/deflate.c Tracevv((stderr,"%c", s->window[s->strstart])); s 1727 tools/packfi2/deflate.c _tr_tally_lit (s, s->window[s->strstart], bflush); s 1728 tools/packfi2/deflate.c s->lookahead--; s 1729 tools/packfi2/deflate.c s->strstart++; s 1731 tools/packfi2/deflate.c if (bflush) FLUSH_BLOCK(s, 0); s 1733 tools/packfi2/deflate.c FLUSH_BLOCK(s, flush == Z_FINISH); s 268 tools/packfi2/deflate.h #define put_byte(s, c) {s->pending_buf[s->pending++] = (c);} s 276 tools/packfi2/deflate.h #define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD) s 282 tools/packfi2/deflate.h void _tr_init OF((deflate_state *s)); s 283 tools/packfi2/deflate.h int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); s 284 tools/packfi2/deflate.h void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len, s 286 tools/packfi2/deflate.h void _tr_align OF((deflate_state *s)); s 287 tools/packfi2/deflate.h void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, s 308 tools/packfi2/deflate.h # define _tr_tally_lit(s, c, flush) \ s 310 tools/packfi2/deflate.h s->d_buf[s->last_lit] = 0; \ s 311 tools/packfi2/deflate.h s->l_buf[s->last_lit++] = cc; \ s 312 tools/packfi2/deflate.h s->dyn_ltree[cc].Freq++; \ s 313 tools/packfi2/deflate.h flush = (s->last_lit == s->lit_bufsize-1); \ s 315 tools/packfi2/deflate.h # define _tr_tally_dist(s, distance, length, flush) \ s 318 tools/packfi2/deflate.h s->d_buf[s->last_lit] = dist; \ s 319 tools/packfi2/deflate.h s->l_buf[s->last_lit++] = len; \ s 321 tools/packfi2/deflate.h s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ s 322 tools/packfi2/deflate.h s->dyn_dtree[d_code(dist)].Freq++; \ s 323 tools/packfi2/deflate.h flush = (s->last_lit == s->lit_bufsize-1); \ s 326 tools/packfi2/deflate.h # define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) s 327 tools/packfi2/deflate.h # define _tr_tally_dist(s, distance, length, flush) \ s 328 tools/packfi2/deflate.h flush = _tr_tally(s, distance, length) s 143 tools/packfi2/trees.c local void init_block OF((deflate_state *s)); s 144 tools/packfi2/trees.c local void pqdownheap OF((deflate_state *s, ct_data *tree, int k)); s 145 tools/packfi2/trees.c local void gen_bitlen OF((deflate_state *s, tree_desc *desc)); s 147 tools/packfi2/trees.c local void build_tree OF((deflate_state *s, tree_desc *desc)); s 148 tools/packfi2/trees.c local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code)); s 149 tools/packfi2/trees.c local void send_tree OF((deflate_state *s, ct_data *tree, int max_code)); s 150 tools/packfi2/trees.c local int build_bl_tree OF((deflate_state *s)); s 151 tools/packfi2/trees.c local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, s 153 tools/packfi2/trees.c local void compress_block OF((deflate_state *s, ct_data *ltree, s 155 tools/packfi2/trees.c local void set_data_type OF((deflate_state *s)); s 157 tools/packfi2/trees.c local void bi_windup OF((deflate_state *s)); s 158 tools/packfi2/trees.c local void bi_flush OF((deflate_state *s)); s 159 tools/packfi2/trees.c local void copy_block OF((deflate_state *s, charf *buf, unsigned len, s 167 tools/packfi2/trees.c # define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len) s 171 tools/packfi2/trees.c # define send_code(s, c, tree) \ s 173 tools/packfi2/trees.c send_bits(s, tree[c].Code, tree[c].Len); } s 180 tools/packfi2/trees.c #define put_short(s, w) { \ s 181 tools/packfi2/trees.c put_byte(s, (uch)((w) & 0xff)); \ s 182 tools/packfi2/trees.c put_byte(s, (uch)((ush)(w) >> 8)); \ s 190 tools/packfi2/trees.c local void send_bits OF((deflate_state *s, int value, int length)); s 192 tools/packfi2/trees.c local void send_bits(s, value, length) s 193 tools/packfi2/trees.c deflate_state *s; s 199 tools/packfi2/trees.c s->bits_sent += (ulg)length; s 205 tools/packfi2/trees.c if (s->bi_valid > (int)Buf_size - length) { s 206 tools/packfi2/trees.c s->bi_buf |= (value << s->bi_valid); s 207 tools/packfi2/trees.c put_short(s, s->bi_buf); s 208 tools/packfi2/trees.c s->bi_buf = (ush)value >> (Buf_size - s->bi_valid); s 209 tools/packfi2/trees.c s->bi_valid += length - Buf_size; s 211 tools/packfi2/trees.c s->bi_buf |= value << s->bi_valid; s 212 tools/packfi2/trees.c s->bi_valid += length; s 217 tools/packfi2/trees.c #define send_bits(s, value, length) \ s 219 tools/packfi2/trees.c if (s->bi_valid > (int)Buf_size - len) {\ s 221 tools/packfi2/trees.c s->bi_buf |= (val << s->bi_valid);\ s 222 tools/packfi2/trees.c put_short(s, s->bi_buf);\ s 223 tools/packfi2/trees.c s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\ s 224 tools/packfi2/trees.c s->bi_valid += len - Buf_size;\ s 226 tools/packfi2/trees.c s->bi_buf |= (value) << s->bi_valid;\ s 227 tools/packfi2/trees.c s->bi_valid += len;\ s 382 tools/packfi2/trees.c void _tr_init(s) s 383 tools/packfi2/trees.c deflate_state *s; s 387 tools/packfi2/trees.c s->l_desc.dyn_tree = s->dyn_ltree; s 388 tools/packfi2/trees.c s->l_desc.stat_desc = &static_l_desc; s 390 tools/packfi2/trees.c s->d_desc.dyn_tree = s->dyn_dtree; s 391 tools/packfi2/trees.c s->d_desc.stat_desc = &static_d_desc; s 393 tools/packfi2/trees.c s->bl_desc.dyn_tree = s->bl_tree; s 394 tools/packfi2/trees.c s->bl_desc.stat_desc = &static_bl_desc; s 396 tools/packfi2/trees.c s->bi_buf = 0; s 397 tools/packfi2/trees.c s->bi_valid = 0; s 398 tools/packfi2/trees.c s->last_eob_len = 8; /* enough lookahead for inflate */ s 400 tools/packfi2/trees.c s->compressed_len = 0L; s 401 tools/packfi2/trees.c s->bits_sent = 0L; s 405 tools/packfi2/trees.c init_block(s); s 411 tools/packfi2/trees.c local void init_block(s) s 412 tools/packfi2/trees.c deflate_state *s; s 417 tools/packfi2/trees.c for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0; s 418 tools/packfi2/trees.c for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0; s 419 tools/packfi2/trees.c for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0; s 421 tools/packfi2/trees.c s->dyn_ltree[END_BLOCK].Freq = 1; s 422 tools/packfi2/trees.c s->opt_len = s->static_len = 0L; s 423 tools/packfi2/trees.c s->last_lit = s->matches = 0; s 434 tools/packfi2/trees.c #define pqremove(s, tree, top) \ s 436 tools/packfi2/trees.c top = s->heap[SMALLEST]; \ s 437 tools/packfi2/trees.c s->heap[SMALLEST] = s->heap[s->heap_len--]; \ s 438 tools/packfi2/trees.c pqdownheap(s, tree, SMALLEST); \ s 455 tools/packfi2/trees.c local void pqdownheap(s, tree, k) s 456 tools/packfi2/trees.c deflate_state *s; s 460 tools/packfi2/trees.c int v = s->heap[k]; s 462 tools/packfi2/trees.c while (j <= s->heap_len) { s 464 tools/packfi2/trees.c if (j < s->heap_len && s 465 tools/packfi2/trees.c smaller(tree, s->heap[j+1], s->heap[j], s->depth)) { s 469 tools/packfi2/trees.c if (smaller(tree, v, s->heap[j], s->depth)) break; s 472 tools/packfi2/trees.c s->heap[k] = s->heap[j]; k = j; s 477 tools/packfi2/trees.c s->heap[k] = v; s 490 tools/packfi2/trees.c local void gen_bitlen(s, desc) s 491 tools/packfi2/trees.c deflate_state *s; s 507 tools/packfi2/trees.c for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0; s 512 tools/packfi2/trees.c tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */ s 514 tools/packfi2/trees.c for (h = s->heap_max+1; h < HEAP_SIZE; h++) { s 515 tools/packfi2/trees.c n = s->heap[h]; s 523 tools/packfi2/trees.c s->bl_count[bits]++; s 527 tools/packfi2/trees.c s->opt_len += (ulg)f * (bits + xbits); s 528 tools/packfi2/trees.c if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits); s 538 tools/packfi2/trees.c while (s->bl_count[bits] == 0) bits--; s 539 tools/packfi2/trees.c s->bl_count[bits]--; /* move one leaf down the tree */ s 540 tools/packfi2/trees.c s->bl_count[bits+1] += 2; /* move one overflow item as its brother */ s 541 tools/packfi2/trees.c s->bl_count[max_length]--; s 554 tools/packfi2/trees.c n = s->bl_count[bits]; s 556 tools/packfi2/trees.c m = s->heap[--h]; s 560 tools/packfi2/trees.c s->opt_len += ((long)bits - (long)tree[m].Len) s 619 tools/packfi2/trees.c local void build_tree(s, desc) s 620 tools/packfi2/trees.c deflate_state *s; s 634 tools/packfi2/trees.c s->heap_len = 0, s->heap_max = HEAP_SIZE; s 638 tools/packfi2/trees.c s->heap[++(s->heap_len)] = max_code = n; s 639 tools/packfi2/trees.c s->depth[n] = 0; s 650 tools/packfi2/trees.c while (s->heap_len < 2) { s 651 tools/packfi2/trees.c node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0); s 653 tools/packfi2/trees.c s->depth[node] = 0; s 654 tools/packfi2/trees.c s->opt_len--; if (stree) s->static_len -= stree[node].Len; s 662 tools/packfi2/trees.c for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n); s 669 tools/packfi2/trees.c pqremove(s, tree, n); /* n = node of least frequency */ s 670 tools/packfi2/trees.c m = s->heap[SMALLEST]; /* m = node of next least frequency */ s 672 tools/packfi2/trees.c s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */ s 673 tools/packfi2/trees.c s->heap[--(s->heap_max)] = m; s 677 tools/packfi2/trees.c s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ? s 678 tools/packfi2/trees.c s->depth[n] : s->depth[m]) + 1); s 681 tools/packfi2/trees.c if (tree == s->bl_tree) { s 687 tools/packfi2/trees.c s->heap[SMALLEST] = node++; s 688 tools/packfi2/trees.c pqdownheap(s, tree, SMALLEST); s 690 tools/packfi2/trees.c } while (s->heap_len >= 2); s 692 tools/packfi2/trees.c s->heap[--(s->heap_max)] = s->heap[SMALLEST]; s 697 tools/packfi2/trees.c gen_bitlen(s, (tree_desc *)desc); s 700 tools/packfi2/trees.c gen_codes ((ct_data *)tree, max_code, s->bl_count); s 707 tools/packfi2/trees.c local void scan_tree (s, tree, max_code) s 708 tools/packfi2/trees.c deflate_state *s; s 728 tools/packfi2/trees.c s->bl_tree[curlen].Freq += count; s 730 tools/packfi2/trees.c if (curlen != prevlen) s->bl_tree[curlen].Freq++; s 731 tools/packfi2/trees.c s->bl_tree[REP_3_6].Freq++; s 733 tools/packfi2/trees.c s->bl_tree[REPZ_3_10].Freq++; s 735 tools/packfi2/trees.c s->bl_tree[REPZ_11_138].Freq++; s 752 tools/packfi2/trees.c local void send_tree (s, tree, max_code) s 753 tools/packfi2/trees.c deflate_state *s; s 773 tools/packfi2/trees.c do { send_code(s, curlen, s->bl_tree); } while (--count != 0); s 777 tools/packfi2/trees.c send_code(s, curlen, s->bl_tree); count--; s 780 tools/packfi2/trees.c send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2); s 783 tools/packfi2/trees.c send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3); s 786 tools/packfi2/trees.c send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7); s 803 tools/packfi2/trees.c local int build_bl_tree(s) s 804 tools/packfi2/trees.c deflate_state *s; s 809 tools/packfi2/trees.c scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code); s 810 tools/packfi2/trees.c scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code); s 813 tools/packfi2/trees.c build_tree(s, (tree_desc *)(&(s->bl_desc))); s 823 tools/packfi2/trees.c if (s->bl_tree[bl_order[max_blindex]].Len != 0) break; s 826 tools/packfi2/trees.c s->opt_len += 3*(max_blindex+1) + 5+5+4; s 828 tools/packfi2/trees.c s->opt_len, s->static_len)); s 838 tools/packfi2/trees.c local void send_all_trees(s, lcodes, dcodes, blcodes) s 839 tools/packfi2/trees.c deflate_state *s; s 848 tools/packfi2/trees.c send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */ s 849 tools/packfi2/trees.c send_bits(s, dcodes-1, 5); s 850 tools/packfi2/trees.c send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */ s 853 tools/packfi2/trees.c send_bits(s, s->bl_tree[bl_order[rank]].Len, 3); s 855 tools/packfi2/trees.c Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); s 857 tools/packfi2/trees.c send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */ s 858 tools/packfi2/trees.c Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); s 860 tools/packfi2/trees.c send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */ s 861 tools/packfi2/trees.c Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); s 867 tools/packfi2/trees.c void _tr_stored_block(s, buf, stored_len, eof) s 868 tools/packfi2/trees.c deflate_state *s; s 873 tools/packfi2/trees.c send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */ s 875 tools/packfi2/trees.c s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; s 876 tools/packfi2/trees.c s->compressed_len += (stored_len + 4) << 3; s 878 tools/packfi2/trees.c copy_block(s, buf, (unsigned)stored_len, 1); /* with header */ s 892 tools/packfi2/trees.c void _tr_align(s) s 893 tools/packfi2/trees.c deflate_state *s; s 895 tools/packfi2/trees.c send_bits(s, STATIC_TREES<<1, 3); s 896 tools/packfi2/trees.c send_code(s, END_BLOCK, static_ltree); s 898 tools/packfi2/trees.c s->compressed_len += 10L; /* 3 for block type, 7 for EOB */ s 900 tools/packfi2/trees.c bi_flush(s); s 906 tools/packfi2/trees.c if (1 + s->last_eob_len + 10 - s->bi_valid < 9) { s 907 tools/packfi2/trees.c send_bits(s, STATIC_TREES<<1, 3); s 908 tools/packfi2/trees.c send_code(s, END_BLOCK, static_ltree); s 910 tools/packfi2/trees.c s->compressed_len += 10L; s 912 tools/packfi2/trees.c bi_flush(s); s 914 tools/packfi2/trees.c s->last_eob_len = 7; s 921 tools/packfi2/trees.c void _tr_flush_block(s, buf, stored_len, eof) s 922 tools/packfi2/trees.c deflate_state *s; s 931 tools/packfi2/trees.c if (s->level > 0) { s 934 tools/packfi2/trees.c if (stored_len > 0 && s->strm->data_type == Z_UNKNOWN) s 935 tools/packfi2/trees.c set_data_type(s); s 938 tools/packfi2/trees.c build_tree(s, (tree_desc *)(&(s->l_desc))); s 939 tools/packfi2/trees.c Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, s 940 tools/packfi2/trees.c s->static_len)); s 942 tools/packfi2/trees.c build_tree(s, (tree_desc *)(&(s->d_desc))); s 943 tools/packfi2/trees.c Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, s 944 tools/packfi2/trees.c s->static_len)); s 952 tools/packfi2/trees.c max_blindex = build_bl_tree(s); s 955 tools/packfi2/trees.c opt_lenb = (s->opt_len+3+7)>>3; s 956 tools/packfi2/trees.c static_lenb = (s->static_len+3+7)>>3; s 959 tools/packfi2/trees.c opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, s 960 tools/packfi2/trees.c s->last_lit)); s 981 tools/packfi2/trees.c _tr_stored_block(s, buf, stored_len, eof); s 986 tools/packfi2/trees.c } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) { s 988 tools/packfi2/trees.c send_bits(s, (STATIC_TREES<<1)+eof, 3); s 989 tools/packfi2/trees.c compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree); s 991 tools/packfi2/trees.c s->compressed_len += 3 + s->static_len; s 994 tools/packfi2/trees.c send_bits(s, (DYN_TREES<<1)+eof, 3); s 995 tools/packfi2/trees.c send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1, s 997 tools/packfi2/trees.c compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree); s 999 tools/packfi2/trees.c s->compressed_len += 3 + s->opt_len; s 1002 tools/packfi2/trees.c Assert (s->compressed_len == s->bits_sent, "bad compressed size"); s 1006 tools/packfi2/trees.c init_block(s); s 1009 tools/packfi2/trees.c bi_windup(s); s 1011 tools/packfi2/trees.c s->compressed_len += 7; /* align on byte boundary */ s 1014 tools/packfi2/trees.c Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, s 1015 tools/packfi2/trees.c s->compressed_len-7*eof)); s 1022 tools/packfi2/trees.c int _tr_tally (s, dist, lc) s 1023 tools/packfi2/trees.c deflate_state *s; s 1027 tools/packfi2/trees.c s->d_buf[s->last_lit] = (ush)dist; s 1028 tools/packfi2/trees.c s->l_buf[s->last_lit++] = (uch)lc; s 1031 tools/packfi2/trees.c s->dyn_ltree[lc].Freq++; s 1033 tools/packfi2/trees.c s->matches++; s 1036 tools/packfi2/trees.c Assert((ush)dist < (ush)MAX_DIST(s) && s 1040 tools/packfi2/trees.c s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++; s 1041 tools/packfi2/trees.c s->dyn_dtree[d_code(dist)].Freq++; s 1046 tools/packfi2/trees.c if ((s->last_lit & 0x1fff) == 0 && s->level > 2) { s 1048 tools/packfi2/trees.c ulg out_length = (ulg)s->last_lit*8L; s 1049 tools/packfi2/trees.c ulg in_length = (ulg)((long)s->strstart - s->block_start); s 1052 tools/packfi2/trees.c out_length += (ulg)s->dyn_dtree[dcode].Freq * s 1057 tools/packfi2/trees.c s->last_lit, in_length, out_length, s 1059 tools/packfi2/trees.c if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1; s 1062 tools/packfi2/trees.c return (s->last_lit == s->lit_bufsize-1); s 1072 tools/packfi2/trees.c local void compress_block(s, ltree, dtree) s 1073 tools/packfi2/trees.c deflate_state *s; s 1083 tools/packfi2/trees.c if (s->last_lit != 0) do { s 1084 tools/packfi2/trees.c dist = s->d_buf[lx]; s 1085 tools/packfi2/trees.c lc = s->l_buf[lx++]; s 1087 tools/packfi2/trees.c send_code(s, lc, ltree); /* send a literal byte */ s 1092 tools/packfi2/trees.c send_code(s, code+LITERALS+1, ltree); /* send the length code */ s 1096 tools/packfi2/trees.c send_bits(s, lc, extra); /* send the extra length bits */ s 1102 tools/packfi2/trees.c send_code(s, code, dtree); /* send the distance code */ s 1106 tools/packfi2/trees.c send_bits(s, dist, extra); /* send the extra distance bits */ s 1111 tools/packfi2/trees.c Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, s 1114 tools/packfi2/trees.c } while (lx < s->last_lit); s 1116 tools/packfi2/trees.c send_code(s, END_BLOCK, ltree); s 1117 tools/packfi2/trees.c s->last_eob_len = ltree[END_BLOCK].Len; s 1126 tools/packfi2/trees.c local void set_data_type(s) s 1127 tools/packfi2/trees.c deflate_state *s; s 1132 tools/packfi2/trees.c if (s->dyn_ltree[n].Freq != 0) s 1136 tools/packfi2/trees.c if (s->dyn_ltree[n].Freq != 0) s 1138 tools/packfi2/trees.c s->strm->data_type = (n == 32) ? Z_TEXT : Z_BINARY; s 1161 tools/packfi2/trees.c local void bi_flush(s) s 1162 tools/packfi2/trees.c deflate_state *s; s 1164 tools/packfi2/trees.c if (s->bi_valid == 16) { s 1165 tools/packfi2/trees.c put_short(s, s->bi_buf); s 1166 tools/packfi2/trees.c s->bi_buf = 0; s 1167 tools/packfi2/trees.c s->bi_valid = 0; s 1168 tools/packfi2/trees.c } else if (s->bi_valid >= 8) { s 1169 tools/packfi2/trees.c put_byte(s, (Byte)s->bi_buf); s 1170 tools/packfi2/trees.c s->bi_buf >>= 8; s 1171 tools/packfi2/trees.c s->bi_valid -= 8; s 1178 tools/packfi2/trees.c local void bi_windup(s) s 1179 tools/packfi2/trees.c deflate_state *s; s 1181 tools/packfi2/trees.c if (s->bi_valid > 8) { s 1182 tools/packfi2/trees.c put_short(s, s->bi_buf); s 1183 tools/packfi2/trees.c } else if (s->bi_valid > 0) { s 1184 tools/packfi2/trees.c put_byte(s, (Byte)s->bi_buf); s 1186 tools/packfi2/trees.c s->bi_buf = 0; s 1187 tools/packfi2/trees.c s->bi_valid = 0; s 1189 tools/packfi2/trees.c s->bits_sent = (s->bits_sent+7) & ~7; s 1197 tools/packfi2/trees.c local void copy_block(s, buf, len, header) s 1198 tools/packfi2/trees.c deflate_state *s; s 1203 tools/packfi2/trees.c bi_windup(s); /* align on byte boundary */ s 1204 tools/packfi2/trees.c s->last_eob_len = 8; /* enough lookahead for inflate */ s 1207 tools/packfi2/trees.c put_short(s, (ush)len); s 1208 tools/packfi2/trees.c put_short(s, (ush)~len); s 1210 tools/packfi2/trees.c s->bits_sent += 2*16; s 1214 tools/packfi2/trees.c s->bits_sent += (ulg)len<<3; s 1217 tools/packfi2/trees.c put_byte(s, *buf++); s 1135 tools/packfi2/zlib.h ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); s 267 tools/packfi2/zutil.h #define TRY_FREE(s, p) {if (p) ZFREE(s, p);} s 50 tools/stubs_load.c static char* get_str(char *s, char *d) s 52 tools/stubs_load.c while ((*s == ' ') || (*s == '\t') || (*s == ',')) s++; s 53 tools/stubs_load.c while (*s && (*s != ' ') && (*s != '\t') && (*s != ',') && (*s != '=') && (*s != ')')) s 55 tools/stubs_load.c *d++ = *s++; s 57 tools/stubs_load.c while (*s && (*s != ',') && (*s != '=') && (*s != ')')) s 59 tools/stubs_load.c if (*s == '+') s 61 tools/stubs_load.c *d++ = *s++; s 62 tools/stubs_load.c while ((*s == ' ') || (*s == '\t') || (*s == ',')) s++; s 63 tools/stubs_load.c while (*s && (*s != ' ') && (*s != '\t') && (*s != ',') && (*s != '=') && (*s != ')')) s 65 tools/stubs_load.c *d++ = *s++; s 68 tools/stubs_load.c else s++; s 71 tools/stubs_load.c return s; s 171 tools/stubs_load.c char *s; s 175 tools/stubs_load.c s = get_str(line,val); s 176 tools/stubs_load.c get_str(s,nm); s 196 tools/stubs_load.c char *s; s 202 tools/stubs_load.c s = strstr(line, "NHSTUB("); s 203 tools/stubs_load.c if (s == 0) { off = 8; s = strstr(line, "NHSTUB2("); } // note may want to flag dif from NHSTUB s 204 tools/stubs_load.c if (s == 0) { off = 7; s = strstr(line, "IGNORE("); typ = TYPE_IGNORE; } s 205 tools/stubs_load.c if (s == 0) { off = 6; s = strstr(line, "NSTUB("); } s 206 tools/stubs_load.c if (s == 0) { off = 4; s = strstr(line, "DEF("); typ = TYPE_DEF; } s 207 tools/stubs_load.c if (s == 0) { off = 10; s = strstr(line, "DEF_CONST("); typ = TYPE_CONST; } s 208 tools/stubs_load.c if (s != 0) s 211 tools/stubs_load.c if ((exclude_comments == 0) || (c == 0) || (c > s)) s 213 tools/stubs_load.c s = get_str(s+off,nm); s 215 tools/stubs_load.c get_str(s,val); s 218 tools/stubs_load.c osig *p = add_sig(nm, val, hdr, ((c != 0) && (c <= s)) ? 1 : 0); s 250 tools/stubs_load.c char *s; s 256 tools/stubs_load.c s = strstr(line, "};"); s 257 tools/stubs_load.c if (s != 0) return; s 258 tools/stubs_load.c s = strstr(line, "MODE_"); s 259 tools/stubs_load.c if (s != 0) s 262 tools/stubs_load.c if ((c == 0) || (c > s)) s 264 tools/stubs_load.c s = get_str(s,nm); s 265 tools/stubs_load.c get_str(s,val); s 272 tools/stubs_load.c s = strstr(line, "modemap["); s 273 tools/stubs_load.c if (s != 0) found_modemap = 1; s 289 tools/stubs_load.c char *s; s 293 tools/stubs_load.c s = strstr(line, "CAM_DNG_LENS_INFO"); s 294 tools/stubs_load.c if (s != 0) s 297 tools/stubs_load.c if ((c == 0) || (c > s)) s 299 tools/stubs_load.c s = strstr(line,"{")+1; s 300 tools/stubs_load.c s = get_str(s,val); s 301 tools/stubs_load.c s = get_str(s,div); s 305 tools/stubs_load.c s = get_str(s,val); s 306 tools/stubs_load.c s = get_str(s,div); s 312 tools/stubs_load.c s = strstr(line, "CAM_PROPSET"); s 313 tools/stubs_load.c if (s != 0) s 316 tools/stubs_load.c if ((c == 0) || (c > s)) s 318 tools/stubs_load.c s = s + strlen("CAM_PROPSET"); s 319 tools/stubs_load.c s = get_str(s,val); s 336 tools/stubs_load.c char *s; s 340 tools/stubs_load.c s = strstr(line, "#define"); s 341 tools/stubs_load.c if (s == 0) s 346 tools/stubs_load.c if (c && c < s) s 350 tools/stubs_load.c char *nm = strtok(s+strlen("#define")," \t"); s 380 tools/stubs_load.c char *s; s 384 tools/stubs_load.c s = strstr(line, "="); s 385 tools/stubs_load.c if (s != 0) s 388 tools/stubs_load.c if ((c == 0) || (c > s)) s 391 tools/stubs_load.c s = get_str(line,nm); s 392 tools/stubs_load.c get_str(s+1,val); s 13 tools/ubasic_test/camera_functions.c int script_keyid_by_name(const char *s) {