# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1307012323 0 # Node ID 240bd5fb84533e245681f513a770cad8a2567048 # Parent 140d04226c86b2f14fca06bc54c8a9db025b4902 Ugg... tabs got enabled in my editor and I didn't notice until after I committed. diff -r 140d04226c86 -r 240bd5fb8453 os2/dw.c --- a/os2/dw.c Thu Jun 02 10:56:16 2011 +0000 +++ b/os2/dw.c Thu Jun 02 10:58:43 2011 +0000 @@ -4081,52 +4081,52 @@ */ char * API dw_font_choose(char *currfont) { - FONTDLG fd = { 0 }; - char *buf = calloc(1,100); + FONTDLG fd = { 0 }; + char *buf = calloc(1,100); int size = 9; /* Fill in the family name if possible */ - if(currfont) - { - char *name = strchr(currfont, "."); - if(name) - { - int newsize = atoi(currfont); - if(newsize > 0) + if(currfont) + { + char *name = strchr(currfont, "."); + if(name) + { + int newsize = atoi(currfont); + if(newsize > 0) size = newsize; - name++; - strcpy(buf, name); + name++; + strcpy(buf, name); strcpy(fd.fAttrs.szFacename, name); - } - else - { - strcpy(buf, currfont); + } + else + { + strcpy(buf, currfont); strcpy(fd.fAttrs.szFacename, currfont); - } - } + } + } /* Fill in the font dialog struct */ fd.cbSize = sizeof(fd); - fd.hpsScreen = WinGetScreenPS(HWND_DESKTOP); - fd.pszTitle = "Choose Font"; - fd.clrFore = CLR_BLACK; - fd.clrBack = CLR_WHITE; - fd.pszFamilyname = buf; - fd.usFamilyBufLen = 100; - fd.fxPointSize = MAKEFIXED(size,0); + fd.hpsScreen = WinGetScreenPS(HWND_DESKTOP); + fd.pszTitle = "Choose Font"; + fd.clrFore = CLR_BLACK; + fd.clrBack = CLR_WHITE; + fd.pszFamilyname = buf; + fd.usFamilyBufLen = 100; + fd.fxPointSize = MAKEFIXED(size,0); fd.fl = FNTS_INITFROMFATTRS; /* Show the dialog and wait for a response */ - if(!WinFontDlg(HWND_DESKTOP, HWND_OBJECT, &fd) || fd.lReturn != DID_OK) - { - WinReleasePS(fd.hpsScreen); + if(!WinFontDlg(HWND_DESKTOP, HWND_OBJECT, &fd) || fd.lReturn != DID_OK) + { + WinReleasePS(fd.hpsScreen); free(buf); - return NULL; - } - WinReleasePS(fd.hpsScreen); + return NULL; + } + WinReleasePS(fd.hpsScreen); /* Figure out what the user selected and return that */ - size = FIXEDINT(fd.fxPointSize); - sprintf(buf, "%d.%s", size, fd.fAttrs.szFacename); + size = FIXEDINT(fd.fxPointSize); + sprintf(buf, "%d.%s", size, fd.fAttrs.szFacename); return buf; }