File: mkGoff.c

package info (click to toggle)
unzip 5.40-1
  • links: PTS
  • area: non-free
  • in suites: potato
  • size: 4,120 kB
  • ctags: 5,900
  • sloc: ansic: 40,977; cpp: 3,778; makefile: 1,384; asm: 1,228; sh: 133
file content (34 lines) | stat: -rw-r--r-- 1,076 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* Write out a fragment of assembly source giving offsets in globals.h: */

#define UNZIP_INTERNAL
#include "unzip.h"
#include "crypt.h"
#include <stdio.h>

/* Keep this in sync with the definition of redirSlide in unzpriv.h: */
#ifdef DLL
#  define pG_redirSlide pG->redirect_pointer
#else
#  define pG_redirSlide pG->area.Slide
#endif

int main(int argc, char **argv)
{
    Uz_Globs *pG = (void *) 0L;

    printf("bb              EQU     %lu\n", &pG->bb);
    printf("bk              EQU     %lu\n", &pG->bk);
    printf("wp              EQU     %lu\n", &pG->wp);
#ifdef FUNZIP
    printf("in              EQU     %lu\n", &pG->in);
#else
    printf("incnt           EQU     %lu\n", &pG->incnt);
    printf("inptr           EQU     %lu\n", &pG->inptr);
    printf("csize           EQU     %lu\n", &pG->csize);
    printf("mem_mode        EQU     %lu\n", &pG->mem_mode);
#endif
    printf("slide           EQU     %lu\n", &pG_redirSlide);
    printf("SIZEOF_slide    EQU     %lu\n", sizeof(pG_redirSlide));
    printf("CRYPT           EQU     %d\n",  CRYPT);
    return 0;
}