summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipng
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-04-30 21:53:49 +0000
committerKarl Berry <karl@freefriends.org>2008-04-30 21:53:49 +0000
commita834b8647f369a99764a8de2b9dc07bbcd38df7a (patch)
treee157ca61aacdec0ec1a5732f917e44e1b6c6a673 /Build/source/texk/dvipng
parent0d3960d88898b0af67c4c022ee49601dd5f84968 (diff)
avoid mmap struct member name, a #define on AIX
git-svn-id: svn://tug.org/texlive/trunk@7754 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipng')
-rw-r--r--Build/source/texk/dvipng/color.c4
-rw-r--r--Build/source/texk/dvipng/dvipng.h2
-rw-r--r--Build/source/texk/dvipng/enc.c4
-rw-r--r--Build/source/texk/dvipng/fontmap.c4
-rw-r--r--Build/source/texk/dvipng/misc.c32
-rw-r--r--Build/source/texk/dvipng/pk.c4
-rw-r--r--Build/source/texk/dvipng/sfd.c4
-rw-r--r--Build/source/texk/dvipng/tfm.c6
-rw-r--r--Build/source/texk/dvipng/vf.c6
9 files changed, 33 insertions, 33 deletions
diff --git a/Build/source/texk/dvipng/color.c b/Build/source/texk/dvipng/color.c
index c4470bbacb5..b2539e6eb5c 100644
--- a/Build/source/texk/dvipng/color.c
+++ b/Build/source/texk/dvipng/color.c
@@ -102,8 +102,8 @@ struct colorname* LoadColornameFile(char* filename, bool should_exist)
}
DEBUG_PRINT(DEBUG_COLOR,("\n OPEN COLOR NAMES:\t'%s'", filepath));
if (MmapFile(filepath,&fmmap)) return NULL;
- pos=fmmap.mmap;
- max=fmmap.mmap+fmmap.size;
+ pos=fmmap.dp_mmap;
+ max=fmmap.dp_mmap+fmmap.size;
while (pos<max && *pos!='\\') pos++;
while(pos+9<max && strncmp(pos,"\\endinput",9)!=0) {
if (pos+17<max && strncmp(pos,"\\DefineNamedColor",17)==0) {
diff --git a/Build/source/texk/dvipng/dvipng.h b/Build/source/texk/dvipng/dvipng.h
index d16f87e8f06..9edced1c45d 100644
--- a/Build/source/texk/dvipng/dvipng.h
+++ b/Build/source/texk/dvipng/dvipng.h
@@ -214,7 +214,7 @@ struct filemmap {
#else /* MIKTEX */
int fd;
#endif /* MIKTEX */
- char* mmap;
+ char* dp_mmap;
size_t size;
};
diff --git a/Build/source/texk/dvipng/enc.c b/Build/source/texk/dvipng/enc.c
index efe4ffef4d1..49c888bd780 100644
--- a/Build/source/texk/dvipng/enc.c
+++ b/Build/source/texk/dvipng/enc.c
@@ -53,8 +53,8 @@ struct encoding* InitEncoding(char* encoding)
}
encp->name=(char*)encp+sizeof(struct encoding);
strcpy(encp->name,encoding);
- pos=fmmap.mmap;
- max=fmmap.mmap+fmmap.size;
+ pos=fmmap.dp_mmap;
+ max=fmmap.dp_mmap+fmmap.size;
buf=encp->name+strlen(encoding)+1;
#define SKIPCOMMENT(x) if (*x=='%') while (x<max && *x!='\n') x++;
while(pos<max && *pos!='/') {
diff --git a/Build/source/texk/dvipng/fontmap.c b/Build/source/texk/dvipng/fontmap.c
index 5b77e3eb8c8..496a41d6488 100644
--- a/Build/source/texk/dvipng/fontmap.c
+++ b/Build/source/texk/dvipng/fontmap.c
@@ -144,8 +144,8 @@ struct psfontmap *SearchPSFontMap(char* fontname,
if (pos==end && search_mmap!=searching_mmap) {
searching_mmap=search_mmap;
- pos=searching_mmap->mmap;
- end=searching_mmap->mmap+searching_mmap->size;
+ pos=searching_mmap->dp_mmap;
+ end=searching_mmap->dp_mmap+searching_mmap->size;
}
while(pos<end && (entry==NULL || strcmp(entry->tfmname,fontname)!=0)) {
while(pos < end
diff --git a/Build/source/texk/dvipng/misc.c b/Build/source/texk/dvipng/misc.c
index 8bd0b60a414..fa544c37f8d 100644
--- a/Build/source/texk/dvipng/misc.c
+++ b/Build/source/texk/dvipng/misc.c
@@ -742,7 +742,7 @@ bool MmapFile (char *filename,struct filemmap *fmmap)
#endif
DEBUG_PRINT(DEBUG_DVI,("\n OPEN FILE:\t'%s'", filename));
- fmmap->mmap=NULL;
+ fmmap->dp_mmap=NULL;
#ifndef MIKTEX
if ((fmmap->fd = open(filename,O_RDONLY)) == -1) {
Warning("cannot open file <%s>", filename);
@@ -751,19 +751,19 @@ bool MmapFile (char *filename,struct filemmap *fmmap)
fstat(fmmap->fd,&stat);
fmmap->size=stat.st_size;
# ifdef HAVE_MMAP
- fmmap->mmap = mmap(NULL,fmmap->size, PROT_READ, MAP_SHARED,fmmap->fd,0);
- if (fmmap->mmap == (char*)-1) {
+ fmmap->dp_mmap = mmap(NULL,fmmap->size, PROT_READ, MAP_SHARED,fmmap->fd,0);
+ if (fmmap->dp_mmap == (char*)-1) {
Warning("cannot mmap file <%s>",filename);
- fmmap->mmap=NULL;
+ fmmap->dp_mmap=NULL;
close(fmmap->fd);
return(true);
}
# else /* HAVE_MMAP */
- fmmap->mmap = malloc(fmmap->size);
- if (read(fmmap->fd,fmmap->mmap,fmmap->size)<fmmap->size) {
+ fmmap->dp_mmap = malloc(fmmap->size);
+ if (read(fmmap->fd,fmmap->dp_mmap,fmmap->size)<fmmap->size) {
Warning("too little data in <%s>",filename);
- free(fmmap->mmap);
- fmmap->mmap=NULL;
+ free(fmmap->dp_mmap);
+ fmmap->dp_mmap=NULL;
close(fmmap->fd);
return(true);
}
@@ -783,8 +783,8 @@ bool MmapFile (char *filename,struct filemmap *fmmap)
Warning("cannot CreateFileMapping() file <%s>", filename);
return(true);
}
- fmmap->mmap = MapViewOfFile(fmmap->hMap, FILE_MAP_READ, 0, 0, 0);
- if (fmmap->mmap == NULL) {
+ fmmap->dp_mmap = MapViewOfFile(fmmap->hMap, FILE_MAP_READ, 0, 0, 0);
+ if (fmmap->dp_mmap == NULL) {
Warning("cannot MapViewOfFile() file <%s>", filename);
CloseHandle (fmmap->hMap);
CloseHandle (fmmap->hFile);
@@ -796,21 +796,21 @@ bool MmapFile (char *filename,struct filemmap *fmmap)
void UnMmapFile(struct filemmap* fmmap)
{
- if (fmmap->mmap!=NULL) {
+ if (fmmap->dp_mmap!=NULL) {
#ifndef MIKTEX
# ifdef HAVE_MMAP
- if (munmap(fmmap->mmap,fmmap->size))
- Warning("cannot munmap file at 0x%X",fmmap->mmap);
+ if (munmap(fmmap->dp_mmap,fmmap->size))
+ Warning("cannot munmap file at 0x%X",fmmap->dp_mmap);
if (close(fmmap->fd))
Warning("cannot close file descriptor %d",fmmap->fd);
# else /* HAVE_MMAP */
- free(fmmap->mmap);
+ free(fmmap->dp_mmap);
# endif /* HAVE_MMAP */
#else /* MIKTEX */
- UnmapViewOfFile (fmmap->mmap);
+ UnmapViewOfFile (fmmap->dp_mmap);
CloseHandle (fmmap->hMap);
CloseHandle (fmmap->hFile);
#endif /* MIKTEX */
}
- fmmap->mmap=NULL;
+ fmmap->dp_mmap=NULL;
}
diff --git a/Build/source/texk/dvipng/pk.c b/Build/source/texk/dvipng/pk.c
index 4ff254172f7..6eb7be92530 100644
--- a/Build/source/texk/dvipng/pk.c
+++ b/Build/source/texk/dvipng/pk.c
@@ -323,7 +323,7 @@ void InitPK(struct font_entry * tfontp)
Message(BE_VERBOSE,"<%s>", tfontp->name);
if (MmapFile(tfontp->name,&(tfontp->fmmap)))
Fatal("font file %s unusable", tfontp->name);
- position=(unsigned char*)tfontp->fmmap.mmap;
+ position=(unsigned char*)tfontp->fmmap.dp_mmap;
if (tfontp->fmmap.size < 2 || tfontp->fmmap.size < 3+*(position+2)+16)
Fatal("PK file %s ends prematurely",tfontp->name);
if (*position++ != PK_PRE)
@@ -353,7 +353,7 @@ void InitPK(struct font_entry * tfontp)
position = skip_specials(position);
while (*position != PK_POST) {
DEBUG_PRINT(DEBUG_PK,("\n @%ld PK CHAR:\t%d",
- (long)position - (long)tfontp->fmmap.mmap, *position));
+ (long)position - (long)tfontp->fmmap.dp_mmap, *position));
if ((tcharptr = malloc(sizeof(struct char_entry))) == NULL)
Fatal("cannot malloc space for char_entry");
tcharptr->flag_byte = *position;
diff --git a/Build/source/texk/dvipng/sfd.c b/Build/source/texk/dvipng/sfd.c
index da9bd40c0a1..f69d7f4ed73 100644
--- a/Build/source/texk/dvipng/sfd.c
+++ b/Build/source/texk/dvipng/sfd.c
@@ -42,8 +42,8 @@ struct subfont* ReadSubfont(char* sfdname, char *infix)
}
DEBUG_PRINT((DEBUG_FT|DEBUG_ENC),("\n OPEN SUBFONT:\t'%s'", sfdfile));
if (MmapFile(sfdfile,&fmmap)) return(NULL);
- pos=fmmap.mmap;
- max=fmmap.mmap+fmmap.size;
+ pos=fmmap.dp_mmap;
+ max=fmmap.dp_mmap+fmmap.size;
while(pos<max && (*pos==' ' || *pos=='\n' || *pos=='\t')) pos++;
while (pos<max && *pos=='#') {
while(pos<max && *pos!='\n') pos++;
diff --git a/Build/source/texk/dvipng/tfm.c b/Build/source/texk/dvipng/tfm.c
index 13215dc4b93..9db2dc8af62 100644
--- a/Build/source/texk/dvipng/tfm.c
+++ b/Build/source/texk/dvipng/tfm.c
@@ -39,7 +39,7 @@ bool ReadTFM(struct font_entry * tfontp, char* tfmname)
DEBUG_PRINT((DEBUG_DVI|DEBUG_FT|DEBUG_TFM),
("\n OPEN METRICS:\t'%s'", tfmname));
if (MmapFile(tfmname,&fmmap)) return(false);
- position=(unsigned char*)fmmap.mmap;
+ position=(unsigned char*)fmmap.dp_mmap;
lh = UNumRead(position+2,2);
bc = UNumRead(position+4,2);
ec = UNumRead(position+6,2);
@@ -56,10 +56,10 @@ bool ReadTFM(struct font_entry * tfontp, char* tfmname)
/* Read char widths */
c=bc;
- position=(unsigned char*)fmmap.mmap+24+lh*4;
+ position=(unsigned char*)fmmap.dp_mmap+24+lh*4;
while(c <= ec) {
DEBUG_PRINT(DEBUG_TFM,("\n@%ld TFM METRICS:\t",
- (long)position - (long)fmmap.mmap));
+ (long)position - (long)fmmap.dp_mmap));
tcharptr=xmalloc(sizeof(struct char_entry));
tcharptr->data=NULL;
tcharptr->tfmw=width[*position];
diff --git a/Build/source/texk/dvipng/vf.c b/Build/source/texk/dvipng/vf.c
index 0d0f74298b0..382e2f6b15c 100644
--- a/Build/source/texk/dvipng/vf.c
+++ b/Build/source/texk/dvipng/vf.c
@@ -62,7 +62,7 @@ void InitVF(struct font_entry * tfontp)
Message(BE_VERBOSE,"<%s>", tfontp->name);
if (MmapFile(tfontp->name,&(tfontp->fmmap)))
Fatal("font file %s unusable", tfontp->name);
- position=(unsigned char*)tfontp->fmmap.mmap;
+ position=(unsigned char*)tfontp->fmmap.dp_mmap;
if (*(position) != PRE)
Fatal("unknown font format in file %s",tfontp->name);
if (*(position+1) != VF_ID)
@@ -82,7 +82,7 @@ void InitVF(struct font_entry * tfontp)
position += 8;
while(*position >= FNT_DEF1 && *position <= FNT_DEF4) {
DEBUG_PRINT(DEBUG_VF,("\n @%ld VF:\t%s",
- (long)position - (long)tfontp->fmmap.mmap,
+ (long)position - (long)tfontp->fmmap.dp_mmap,
dvi_commands[*position]));
FontDef(position,tfontp);
length = dvi_commandlength[*position];
@@ -98,7 +98,7 @@ void InitVF(struct font_entry * tfontp)
/* Read char definitions */
while(*position < FNT_DEF1) {
DEBUG_PRINT(DEBUG_VF,("\n@%ld VF CHAR:\t",
- (long)position - (long)tfontp->fmmap.mmap));
+ (long)position - (long)tfontp->fmmap.dp_mmap));
tcharptr=xmalloc(sizeof(struct char_entry));
switch (*position) {
case LONG_CHAR: