/* Fix Mozilla symbol font problems. Non-console version.*/ #include #include #include #define BUFSIZE 4096 #define PATHLEN 256 int STDCALL WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow) { char output[BUFSIZE]; char buffer[BUFSIZE]; char path[PATHLEN],executable[PATHLEN]; char mathml[PATHLEN],mathml2[PATHLEN]={0}; char fontprop[PATHLEN],fontprop2[PATHLEN]; char cmd[80]; char *start=NULL,*send=NULL; FILE *fdin, *fdout; int length,i,j; *output=0; if(!strlen(lpCmd)){ /* Windows 98 places */ fdin=fopen("\\WINDOWS\\Desktop\\Mozilla.lnk","r"); if(fdin==NULL)fdin=fopen("\\WINDOWS\\Desktop\\Netscape.lnk","r"); /* Windows XP places */ if(fdin==NULL)fdin=fopen("\\Documents and Settings\\All Users\\Desktop\\Mozilla.lnk","r"); if(fdin==NULL)fdin=fopen("\\Documents and Settings\\All Users\\Start Menu\\Programs\\Mozilla\\Mozilla.lnk","r"); if(fdin==NULL)fdin=fopen("\\Program Files\\mozilla.org\\Mozilla\\defaults\\shortcuts\\Mozilla.lnk","r"); }else{ fdin=fopen(lpCmd,"r"); } if(fdin != NULL){ length=fread(buffer,1,BUFSIZE,fdin); sprintf(output+strlen(output),"length=%d\n",length); strncat(output,buffer,length); for (i=0;i