programs/winefontcfg: Add winefontcfg (try 3)

Dan Kegel dank at kegel.com
Fri Jul 13 11:12:11 CDT 2007


All in all the app looks like it's coming along nicely.
I apologize for catching so few problems in each pass,
but we'll get there.

Is there a way you can get the path to the currently running
instance instead of hardcoding it?
Then it would work even if winefontcfg isn't on the PATH.

+    static const WCHAR cmdstr[] = {
+        'w', 'i', 'n', 'e', 'f', 'o', 'n', 't', 'c', 'f', 'g', '.',
'e', 'x', 'e', '.', 's', 'o', ' ',

You're still using nonstandard C; you can't have
initializers on nonstatic arrays.  This is the third
time I have pointed this out; you should look
to make sure you don't do this anywhere in the program.
You should make sure the app can build with visual C 6 if you haven't
lately, too.
+static void TabSelChanged(HWND hTab)
+{
+    int tab[NUMTAB][MAXOBJPERTAB] = {

Say, why is hwndTab static here?  I bet that's a cut and paste error:

+static HWND InitTab(HWND hdlg, HFONT hf)
+{
+    static HWND hwndTab;

Looks like variable reuse abuse here; maybe you should
have a more mnemonic name for the return value of wcstolong:

+        j = wcstolong(buf);

It might be nice to have comments identifying the big hunks
of the program, e.g. if all the code for one tab was grouped under
a comment with the name of the tab.
- Dan



More information about the wine-devel mailing list