2439{
2445 size_t pathlen, filenamelen;
2446 char emptystring = '\0';
2452
2453 TRACE(
"(hfdi == ^%p, pszCabinet == %s, pszCabPath == %s, flags == %x, "
2454 "pfnfdin == ^%p, pfnfdid == ^%p, pvUser == ^%p)\n",
2456
2457 if (!fdi)
return FALSE;
2458
2460 {
2463 }
2465
2466 pathlen = pszCabPath ?
strlen(pszCabPath) : 0;
2467 filenamelen = pszCabinet ?
strlen(pszCabinet) : 0;
2468
2469
2470 if ((pathlen + filenamelen + 3) >
MAX_PATH) {
2471 ERR(
"MAX_PATH exceeded.\n");
2472 fdi->
free(decomp_state);
2475 }
2476
2477
2478 fullpath[0] = '\0';
2479 if (pathlen)
2480 strcpy(fullpath, pszCabPath);
2481 if (filenamelen)
2482 strcat(fullpath, pszCabinet);
2483
2485
2486
2488 if (cabhf == -1) {
2489 fdi->
free(decomp_state);
2493 }
2494
2495
2498 fdi->
free(decomp_state);
2501 }
2502
2503
2508 fdin.
psz1 = (
CAB(mii).nextname) ?
CAB(mii).nextname : &emptystring;
2509 fdin.
psz2 = (
CAB(mii).nextinfo) ?
CAB(mii).nextinfo : &emptystring;
2510 fdin.
psz3 = pszCabPath;
2511
2514 goto bail_and_fail;
2515 }
2516
2520
2521
2525 goto bail_and_fail;
2526 }
2527
2528 if (
CAB(mii).folder_resv > 0)
2530
2532 if (!fol) {
2533 ERR(
"out of memory!\n");
2535 goto bail_and_fail;
2536 }
2538 if (!
CAB(firstfol))
CAB(firstfol) = fol;
2539
2543
2544 if (linkfol)
2545 linkfol->next = fol;
2546 linkfol = fol;
2547 }
2548
2549
2553 goto bail_and_fail;
2554 }
2555
2558 ERR(
"out of memory!\n");
2560 goto bail_and_fail;
2561 }
2564
2572
2573 if (!
file->filename) {
2575 goto bail_and_fail;
2576 }
2577
2578 if (linkfile)
2579 linkfile->next =
file;
2581 }
2582
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2635 fdin.
psz1 = (
char *)
file->filename;
2636 fdin.
psz2 = (
CAB(mii).prevname) ?
CAB(mii).prevname : &emptystring;
2637 fdin.
psz3 = (
CAB(mii).previnfo) ?
CAB(mii).previnfo : &emptystring;
2638
2641 goto bail_and_fail;
2642 }
2643
2645 }
2646 if (
file->oppressed) {
2647 filehf = 0;
2648 } else {
2651 fdin.
psz1 = (
char *)
file->filename;
2659 filehf = 0;
2660 goto bail_and_fail;
2661 }
2662 }
2663
2664
2665 if (filehf) {
2666 fol =
CAB(firstfol);
2668
2670 } else {
2671 unsigned int i2;
2672
2673 for (i2 = 0; (i2 <
file->index); i2++)
2676 }
2677 }
2678
2679 if (filehf) {
2684
2686
2687
2689 CAB(filehf) = filehf;
2690
2691
2693
2695
2696
2697 switch (ct2) {
2702 }
2703 break;
2708 }
2709 break;
2710 }
2711
2716
2717
2718 switch (ct1) {
2721 break;
2724 break;
2727 err =
QTMfdi_init((comptype >> 8) & 0x1f, (comptype >> 4) & 0xF, decomp_state);
2728 break;
2732 break;
2733 default:
2735 }
2736 }
2737
2739
2742 break;
2745 goto bail_and_fail;
2746 default:
2748 goto bail_and_fail;
2749 }
2750
2752
2753 switch (
fdi_decomp(
file, 0, decomp_state, pszCabPath, pfnfdin, pvUser)) {
2755 break;
2758 goto bail_and_fail;
2761 goto bail_and_fail;
2762 default:
2764 goto bail_and_fail;
2765 }
2767 }
2768
2769
2772
2773
2776 fdin.
psz1 = (
char *)
file->filename;
2784 filehf = 0;
2785
2788 break;
2791 goto bail_and_fail;
2794 goto bail_and_fail;
2795 default:
2797 goto bail_and_fail;
2798 }
2799 }
2800 }
2801
2804
2806
2807 bail_and_fail:
2808
2810
2811 if (filehf) fdi->
close(filehf);
2812
2814
2816}
ACPI_SIZE strlen(const char *String)
#define ERROR_NOT_ENOUGH_MEMORY
#define cffoldCOMPTYPE_MSZIP
#define cffileCONTINUED_FROM_PREV
#define cffile_FolderOffset
#define cffile_FolderIndex
#define cffoldCOMPTYPE_LZX
#define cffoldCOMPTYPE_MASK
#define cffoldCOMPTYPE_QUANTUM
#define cffileCONTINUED_TO_NEXT
#define cffile_UncompressedSize
#define cffoldCOMPTYPE_NONE
#define cffold_DataOffset
static char * FDI_read_string(FDI_Int *fdi, INT_PTR hf, long cabsize)
static int LZXfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state)
static FDI_Int * get_fdi_ptr(HFDI hfdi)
static void set_error(FDI_Int *fdi, int oper, int err)
static int NONEfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state)
static BOOL FDI_read_entries(FDI_Int *fdi, INT_PTR hf, PFDICABINETINFO pfdici, PMORE_ISCAB_INFO pmii)
static int QTMfdi_init(int window, int level, fdi_decomp_state *decomp_state)
static void free_decompression_temps(FDI_Int *fdi, const struct fdi_folder *fol, fdi_decomp_state *decomp_state)
static int LZXfdi_init(int window, fdi_decomp_state *decomp_state)
static int ZIPfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state)
static int QTMfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state)
static void free_decompression_mem(FDI_Int *fdi, fdi_decomp_state *decomp_state)
static int fdi_decomp(const struct fdi_file *fi, int savemode, fdi_decomp_state *decomp_state, char *pszCabPath, PFNFDINOTIFY pfnfdin, void *pvUser)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
struct task_struct * current
#define ERROR_FILE_NOT_FOUND
static IHTMLWindow2 * window