Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove extern declaration in C files for some GDraw functions (leave …

…those starting with underscore).

Move the header declaration of these from the private to the public gadget header.
  • Loading branch information...
commit 52f666d0bfc9745e6453addfdb34900ff9a7d700 1 parent e55a4ef
@jhps jhps authored
View
1  fontforge/charinfo.c
@@ -4152,7 +4152,6 @@ return;
if ( !boxset ) {
extern GBox _ggadget_Default_Box;
- extern void GGadgetInit(void);
GGadgetInit();
smallbox = _ggadget_Default_Box;
smallbox.padding = 1;
View
10 fontforge/charview.c
@@ -7289,8 +7289,6 @@ static void cv_ptlistcheck(CharView *cv, struct gmenuitem *mi) {
int acceptable = -1;
uint16 junk;
int i;
- extern void GMenuItemArrayFree(GMenuItem *mi);
- extern GMenuItem *GMenuItem2ArrayCopy(GMenuItem2 *mi, uint16 *cnt);
if ( cv->showing_spiro_pt_menu != (cv->b.sc->inspiro && hasspiro())) {
GMenuItemArrayFree(mi->sub);
@@ -9999,7 +9997,6 @@ static void ap2listbuild(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) {
GMenuItem *sub;
int k, cnt;
AnchorPoint *ap;
- extern void GMenuItemArrayFree(GMenuItem *mi);
if ( mi->sub!=NULL ) {
GMenuItemArrayFree(mi->sub);
@@ -10067,9 +10064,6 @@ static void aplistcheck(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) {
SplineChar *sc = cv->b.sc, **glyphs;
SplineFont *sf = sc->parent;
AnchorPoint *ap, *found;
- extern void GMenuItemArrayFree(GMenuItem *mi);
- extern void GMenuItem2ArrayFree(GMenuItem2 *mi);
- extern GMenuItem *GMenuItem2ArrayCopy(GMenuItem2 *mi, uint16 *cnt);
GMenuItem2 *mit;
int cnt;
@@ -10228,8 +10222,6 @@ static GMenuItem2 mvlist[] = {
static void mvlistcheck(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) {
CharView *cv = (CharView *) GDrawGetUserData(gw);
int i, base, j;
- extern void GMenuItemArrayFree(GMenuItem *mi);
- extern GMenuItem *GMenuItem2ArrayCopy(GMenuItem2 *mi, uint16 *cnt);
MMSet *mm = cv->b.sc->parent->mm;
uint32 submask;
SplineFont *sub;
@@ -10307,8 +10299,6 @@ static void CVMenuShowSubChar(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e
static void mmlistcheck(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) {
CharView *cv = (CharView *) GDrawGetUserData(gw);
int i, base, j;
- extern void GMenuItemArrayFree(GMenuItem *mi);
- extern GMenuItem *GMenuItem2ArrayCopy(GMenuItem2 *mi, uint16 *cnt);
MMSet *mm = cv->b.sc->parent->mm;
SplineFont *sub;
GMenuItem2 *mml;
View
10 fontforge/fontview.c
@@ -4563,7 +4563,6 @@ static GMenuItem2 dummyall[] = {
/* Builds up a menu containing all the anchor classes */
static void aplistbuild(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
- extern void GMenuItemArrayFree(GMenuItem *mi);
GMenuItemArrayFree(mi->sub);
mi->sub = NULL;
@@ -4639,7 +4638,6 @@ static GMenuItem2 emptymenu[] = {
static void FVEncodingMenuBuild(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
- extern void GMenuItemArrayFree(GMenuItem *mi);
if ( mi->sub!=NULL ) {
GMenuItemArrayFree(mi->sub);
@@ -4705,7 +4703,6 @@ return;
static void FVForceEncodingMenuBuild(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
- extern void GMenuItemArrayFree(GMenuItem *mi);
if ( mi->sub!=NULL ) {
GMenuItemArrayFree(mi->sub);
@@ -4999,7 +4996,6 @@ static GMenuItem2 lylist[] = {
static void lylistcheck(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
SplineFont *sf = fv->b.sf;
- extern void GMenuItemArrayFree(GMenuItem *mi);
int ly;
GMenuItem *sub;
@@ -5060,8 +5056,6 @@ static void vwlistcheck(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) {
int i, base;
BDFFont *bdf;
char buffer[50];
- extern void GMenuItemArrayFree(GMenuItem *mi);
- extern GMenuItem *GMenuItem2ArrayCopy(GMenuItem2 *mi, uint16 *cnt);
int pos;
SplineFont *sf = fv->b.sf;
SplineFont *master = sf->cidmaster ? sf->cidmaster : sf;
@@ -5282,8 +5276,6 @@ static GMenuItem2 cdlist[] = {
static void cdlistcheck(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
int i, base, j;
- extern void GMenuItemArrayFree(GMenuItem *mi);
- extern GMenuItem *GMenuItem2ArrayCopy(GMenuItem2 *mi, uint16 *cnt);
SplineFont *sub, *cidmaster = fv->b.cidmaster;
for ( i=0; cdlist[i].mid!=MID_CIDFontInfo; ++i );
@@ -5346,8 +5338,6 @@ static GMenuItem2 mmlist[] = {
static void mmlistcheck(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
int i, base, j;
- extern void GMenuItemArrayFree(GMenuItem *mi);
- extern GMenuItem *GMenuItem2ArrayCopy(GMenuItem2 *mi, uint16 *cnt);
MMSet *mm = fv->b.sf->mm;
SplineFont *sub;
GMenuItem2 *mml;
View
3  fontforge/images.c
@@ -12241,9 +12241,6 @@ void InitToolIconClut(Color bg) {
}
}
-/* Among other things, this routine sets global icon cache up. */
-extern void GGadgetInit(void);
-
/* Some icons in this file, so that FontForge could show anything meaningful */
/* when devoid of its external images. But if these are available and set up */
/* by means of X resources, this routine polls them for fancy icons to use */
View
4 fontforge/metricsview.c
@@ -3201,7 +3201,6 @@ static GMenuItem2 dummyall[] = {
/* Builds up a menu containing all the anchor classes */
static void aplistbuild(GWindow base, struct gmenuitem *mi, GEvent *UNUSED(e)) {
MetricsView *mv = (MetricsView *) GDrawGetUserData(base);
- extern void GMenuItemArrayFree(GMenuItem *mi);
GMenuItemArrayFree(mi->sub);
mi->sub = NULL;
@@ -3260,7 +3259,6 @@ static GMenuItem2 lylist[] = {
static void lylistcheck(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) {
MetricsView *mv = (MetricsView *) GDrawGetUserData(gw);
SplineFont *sf = mv->fv->b.sf;
- extern void GMenuItemArrayFree(GMenuItem *mi);
int ly;
GMenuItem *sub;
@@ -3518,8 +3516,6 @@ static void vwlistcheck(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) {
int i, j, base, aselection;
BDFFont *bdf;
char buffer[60];
- extern void GMenuItemArrayFree(GMenuItem *mi);
- extern GMenuItem *GMenuItem2ArrayCopy(GMenuItem2 *mi, uint16 *cnt);
aselection = false;
for ( j=0; j<mv->glyphcnt; ++j )
View
2  fontforge/savefontdlg.c
@@ -2043,8 +2043,6 @@ return( true );
}
static int e_h(GWindow gw, GEvent *event) {
- extern int GGadgetWithin(GGadget *g, int x, int y);
-
if ( event->type==et_close ) {
struct gfc_data *d = GDrawGetUserData(gw);
d->done = true;
View
4 fontforge/windowmenu.c
@@ -29,8 +29,6 @@
# include "splinefont.h"
# include "ustring.h"
-extern void GMenuItemArrayFree(struct gmenuitem *mi);
-
static void WindowSelect(GWindow base,struct gmenuitem *mi,GEvent *e) {
GDrawRaise(mi->ti.userdata);
}
@@ -55,7 +53,6 @@ void WindowMenuBuild(GWindow basew,struct gmenuitem *mi,GEvent *e) {
BitmapView *bv;
GMenuItem *sub;
BDFFont *bdf;
- extern void GMenuItemArrayFree(GMenuItem *mi);
precnt = 6;
cnt = precnt;
@@ -125,7 +122,6 @@ static void RecentSelect(GWindow base,struct gmenuitem *mi,GEvent *e) {
void MenuRecentBuild(GWindow base,struct gmenuitem *mi,GEvent *e) {
int i, cnt, cnt1;
FontViewBase *fv;
- extern void GMenuItemArrayFree(struct gmenuitem *mi);
GMenuItem *sub;
if ( mi->sub!=NULL ) {
View
6 gdraw/ggadgetP.h
@@ -519,7 +519,6 @@ void _GWidget_ClearPopupOwner(GGadget *g);
extern void _GGadgetCopyDefaultBox(GBox *box);
extern FontInstance *_GGadgetInitDefaultBox(char *class,GBox *box,FontInstance *deffont);
-extern void GGadgetInit(void);
extern void _ggadget_underlineMnemonic(GWindow gw,int32 x,int32 y,unichar_t *label,
unichar_t mneumonic, Color fg,int ymax);
extern void _ggadgetFigureSize(GWindow gw, GBox *design, GRect *r, int isdef);
@@ -551,7 +550,6 @@ extern int GBoxBorderWidth(GWindow gw, GBox *box);
extern int GBoxExtraSpace(GGadget *g);
extern int GBoxDrawnWidth(GWindow gw, GBox *box);
-extern int GGadgetWithin(GGadget *g, int x, int y);
extern int GGadgetInnerWithin(GGadget *g, int x, int y);
extern int GTextInfoGetWidth(GWindow base,GTextInfo *ti,FontInstance *font);
@@ -566,10 +564,6 @@ extern GTextInfo **GTextInfoArrayFromList(GTextInfo *ti, uint16 *cnt);
extern GTextInfo **GTextInfoArrayCopy(GTextInfo **ti);
extern int GTextInfoArrayCount(GTextInfo **ti);
extern int GTextInfoCompare(GTextInfo *ti1, GTextInfo *ti2);
-extern void GMenuItemArrayFree(GMenuItem *mi);
-extern GMenuItem *GMenuItemArrayCopy(GMenuItem *mi, uint16 *cnt);
-extern void GMenuItem2ArrayFree(GMenuItem2 *mi);
-extern GMenuItem *GMenuItem2ArrayCopy(GMenuItem2 *mi, uint16 *cnt);
extern int GMenuItemArrayMask(GMenuItem *mi);
extern int GMenuItemArrayAnyUnmasked(GMenuItem *mi);
View
1  gdraw/ggadgets.c
@@ -61,7 +61,6 @@ int _GGadget_Skip = 6;
int _GGadget_TextImageSkip = 4;
char *_GGadget_ImagePath = NULL;
static int _ggadget_inited=0;
-extern void GGadgetInit(void);
static Color popup_foreground=0, popup_background=COLOR_CREATE(0xff,0xff,0xc0);
static int popup_delay=1000, popup_lifetime=20000;
View
9 inc/ggadget.h
@@ -573,4 +573,13 @@ extern void GMenuItemParseShortCut(GMenuItem *mi,char *shortcut);
extern int GMenuItemParseMask(char *shortcut);
extern int GGadgetUndoMacEnglishOptionCombinations(GEvent *event);
+
+/* Among other things, this routine sets global icon cache up. */
+extern void GGadgetInit(void);
+extern int GGadgetWithin(GGadget *g, int x, int y);
+extern void GMenuItemArrayFree(GMenuItem *mi);
+extern void GMenuItem2ArrayFree(GMenuItem2 *mi);
+extern GMenuItem *GMenuItemArrayCopy(GMenuItem *mi, uint16 *cnt);
+extern GMenuItem *GMenuItem2ArrayCopy(GMenuItem2 *mi, uint16 *cnt);
+
#endif
Please sign in to comment.
Something went wrong with that request. Please try again.