pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/33164: fonts/fontforge v20060209nb2 parse errors



>Number:         33164
>Category:       pkg
>Synopsis:       fontforge has several parse errors due to variables not 
>declared at top of block
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 29 02:10:00 +0000 2006
>Originator:     Keith Waclena
>Release:        NetBSD 1.6.2_STABLE
>Organization:
The University of Chicago Library
>Environment:
System: NetBSD jfcl.lib.uchicago.edu 1.6.2_STABLE NetBSD 1.6.2_STABLE (JFCL) 
#1: Thu Jul 29 18:06:18 CDT 2004 
root@test-keith:/usr/src/sys/arch/i386/compile/JFCL i386
Architecture: i386
Machine: i386
>Description:
Several vars in several source files use the C++ -ism (?) of declaring vars at
first use rather than at top of block; my gcc (2.95.3) doesn't like this.
>How-To-Repeat:
cd /usr/pkgsrc/fonts/fontforge && make
>Fix:
Here's a patch; warning: compiles, but I didn't test since I don't
know how fontforge works (it's a dependency of something else):

diff -u work/fontforge-20060209/fontforge/fontinfo.c 
/tmp/work/fontforge-20060209/fontforge/fontinfo.c
--- work/fontforge-20060209/fontforge/fontinfo.c        Sun Feb  5 19:51:00 2006
+++ /tmp/work/fontforge-20060209/fontforge/fontinfo.c   Tue Mar 28 18:56:03 2006
@@ -5151,6 +5151,7 @@
 #endif
        char os2_vendor[4];
        NameList *nl;
+       int ans;
 
        if ( d->tn_smallactive!=-1 )
            TN_FinishSmallEdit(d);
@@ -5324,7 +5325,7 @@
            buts[2] = GTK_STOCK_CANCEL;
 #endif
            buts[3] = NULL;
-           int ans = gwwv_ask(_("Change UniqueID?"),(const char **) 
buts,0,2,_("You have changed this font's name without changing the UniqueID (or 
XUID).\nThis is probably not a good idea, would you like me to\ngenerate a 
random new value?"));
+           ans = gwwv_ask(_("Change UniqueID?"),(const char **) 
buts,0,2,_("You have changed this font's name without changing the UniqueID (or 
XUID).\nThis is probably not a good idea, would you like me to\ngenerate a 
random new value?"));
            if ( ans==2 ) {
                GDrawSetCursor(gw,ct_pointer);
 return(true);
diff -u work/fontforge-20060209/fontforge/openfontdlg.c 
/tmp/work/fontforge-20060209/fontforge/openfontdlg.c
--- work/fontforge-20060209/fontforge/openfontdlg.c     Sun Feb  5 20:45:51 2006
+++ /tmp/work/fontforge-20060209/fontforge/openfontdlg.c        Tue Mar 28 
18:56:03 2006
@@ -134,6 +134,7 @@
 }
 
 static int e_h(GWindow gw, GEvent *event) {
+       GRect r, size;
     if ( event->type==et_close ) {
        struct gfc_data *d = GDrawGetUserData(gw);
        d->done = true;
@@ -152,7 +153,6 @@
        struct gfc_data *d = GDrawGetUserData(gw);
 return( GGadgetDispatchEvent((GGadget *) (d->gfc),event));
     } else if ( event->type == et_resize ) {
-       GRect r, size;;
        struct gfc_data *d = GDrawGetUserData(gw);
        GDrawGetSize(gw,&size);
        GGadgetGetSize(d->gfc,&r);
diff -u work/fontforge-20060209/fontforge/parsettf.c 
/tmp/work/fontforge-20060209/fontforge/parsettf.c
--- work/fontforge-20060209/fontforge/parsettf.c        Wed Feb  1 16:25:43 2006
+++ /tmp/work/fontforge-20060209/fontforge/parsettf.c   Tue Mar 28 18:56:03 2006
@@ -4255,6 +4255,7 @@
 static int readttf(FILE *ttf, struct ttfinfo *info, char *filename) {
     char *oldloc;
     int i;
+    int choice;
 
 #if !defined(FONTFORGE_CONFIG_NO_WINDOWING_UI)
     gwwv_progress_change_stages(3);
@@ -4283,10 +4284,10 @@
        buts[3] = NULL;
 #if defined(FONTFORGE_CONFIG_GDRAW)
        buts[2] = _("_Cancel");
-       int choice = gwwv_ask(_("Pick a font, any font..."),(const char **) 
buts,0,2,_("This font contains both a TrueType 'glyf' table and an OpenType 
'CFF ' table. FontForge can only deal with one at a time, please pick which one 
you want to use"));
+       choice = gwwv_ask(_("Pick a font, any font..."),(const char **) 
buts,0,2,_("This font contains both a TrueType 'glyf' table and an OpenType 
'CFF ' table. FontForge can only deal with one at a time, please pick which one 
you want to use"));
 #elif defined(FONTFORGE_CONFIG_GTK)
        buts[2] = GTK_STOCK_CANCEL;
-       int choice = gwwv_ask(_("Pick a font, any font..."),(const char **) 
buts,0,2,_("This font contains both a TrueType 'glyf' table and an OpenType 
'CFF ' table. FontForge can only deal with one at a time, please pick which one 
you want to use"));
+       choice = gwwv_ask(_("Pick a font, any font..."),(const char **) 
buts,0,2,_("This font contains both a TrueType 'glyf' table and an OpenType 
'CFF ' table. FontForge can only deal with one at a time, please pick which one 
you want to use"));
 #else
        int choice = 0;
 #endif
diff -u work/fontforge-20060209/fontforge/savefontdlg.c 
/tmp/work/fontforge-20060209/fontforge/savefontdlg.c
--- work/fontforge-20060209/fontforge/savefontdlg.c     Sun Feb  5 19:51:00 2006
+++ /tmp/work/fontforge-20060209/fontforge/savefontdlg.c        Tue Mar 28 
18:56:03 2006
@@ -2143,6 +2143,12 @@
     struct sflist *sfs=NULL, *cur, *last=NULL;
     static int psscalewarned=0, ttfscalewarned=0;
     int flags;
+    struct sflist *sfl;
+    char **former;
+    NameList *rename_to;
+    GTextInfo *ti = GGadgetGetListItemSelected(d->rename);
+    char *nlname = u2utf8_copy(ti->text);
+    extern NameList *force_names_when_saving;
 #if defined(FONTFORGE_CONFIG_GDRAW)
     char *buts[3];
     buts[0] = _("_Yes");
@@ -2151,12 +2157,6 @@
 #elif defined(FONTFORGE_CONFIG_GTK)
     static char *buts[] = { GTK_STOCK_YES, GTK_STOCK_NO, NULL };
 #endif
-    struct sflist *sfl;
-    char **former;
-    NameList *rename_to;
-    GTextInfo *ti = GGadgetGetListItemSelected(d->rename);
-    char *nlname = u2utf8_copy(ti->text);
-    extern NameList *force_names_when_saving;
 
     rename_to = NameListByName(nlname);
     free(nlname);




Home | Main Index | Thread Index | Old Index