Skip to content

Commit

Permalink
Move to scripting.h all the prototypes of non-static scripting.c func…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
gioele committed Jan 2, 2017
1 parent 47fde0d commit 26efe37
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 9 deletions.
1 change: 0 additions & 1 deletion fontforge/baseviews.h
Expand Up @@ -438,7 +438,6 @@ extern void _CVMenuMakeLine(CharViewBase *cv,int do_arc,int ellipse_to_back);
extern void MVCopyChar(FontViewBase *fv, BDFFont *bdf, SplineChar *sc, enum fvcopy_type fullcopy);
extern void PasteIntoMV(FontViewBase *fv, BDFFont *bdf,SplineChar *sc, int doclear);

extern void ExecuteScriptFile(FontViewBase *fv, SplineChar *sc, char *filename);

enum search_flags { sv_reverse = 0x1, sv_flips = 0x2, sv_rotate = 0x4,
sv_scale = 0x8, sv_endpoints=0x10 };
Expand Down
3 changes: 0 additions & 3 deletions fontforge/fontforge.h
Expand Up @@ -41,9 +41,6 @@ static const unsigned unicode4_size = 17*65536;
/* Unicode goes up to 0x10ffff */


extern void ProcessNativeScript(int argc, char *argv[], FILE *script);
extern void CheckIsScript(int argc, char *argv[]);

extern int32 unicode_from_adobestd[256];

/* unicode_nameannot - Deprecated, but kept for older programs to access. */
Expand Down
3 changes: 2 additions & 1 deletion fontforge/scripting.c
Expand Up @@ -28,6 +28,8 @@

#include <fontforge-config.h>

#include "scripting.h"

#include "autohint.h"
#include "autotrace.h"
#include "autowidth.h"
Expand Down Expand Up @@ -80,7 +82,6 @@
#endif
#include "ttf.h"
#include "plugins.h"
#include "scripting.h"
#include "scriptfuncs.h"
#include "flaglist.h"
#include "gutils/prefs.h"
Expand Down
14 changes: 11 additions & 3 deletions fontforge/scripting.h
Expand Up @@ -25,14 +25,17 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef _SCRIPTING_H
#define _SCRIPTING_H
#ifndef FONTFORGE_SCRIPTING_H
#define FONTFORGE_SCRIPTING_H

#include "fontforge-config.h"

#include "baseviews.h"
#include "fontforgevw.h"

#include <setjmp.h>
#include <stdarg.h>
#include <stdio.h>

/* If users want to write user defined scripting built-in functions they will */
/* need this file. The most relevant structure is the Context */
Expand Down Expand Up @@ -157,4 +160,9 @@ extern void ff_statement(Context*);
extern void DictionaryFree(struct dictionary *dica);
#endif

#endif /* _SCRIPTING_H */
extern char **GetFontNames(char *filename, int do_slow);
extern void ProcessNativeScript(int argc, char *argv[], FILE *script);
extern void CheckIsScript(int argc, char *argv[]);
extern void ExecuteScriptFile(FontViewBase *fv, SplineChar *sc, char *filename);

#endif /* FONTFORGE_SCRIPTING_H */
1 change: 0 additions & 1 deletion fontforge/splinefont.h
Expand Up @@ -2740,7 +2740,6 @@ extern void ArchiveCleanup(char *archivedir);
extern char *Unarchive(char *name, char **_archivedir);
extern char *Decompress(char *name, int compression);
extern uint16 MacStyleCode( SplineFont *sf, uint16 *psstyle );
extern char **GetFontNames(char *filename, int do_slow);
extern char **NamesReadSFD(char *filename);
extern char **NamesReadSVG(char *filename);
extern char **NamesReadUFO(char *filename);
Expand Down
2 changes: 2 additions & 0 deletions fontforgeexe/openfontdlg.c
Expand Up @@ -27,6 +27,8 @@
*/
#include "fontforgeui.h"
#include "namelist.h"
#include "scripting.h"

#include <stdlib.h>
#include <string.h>
#include <ustring.h>
Expand Down
2 changes: 2 additions & 0 deletions fontforgeexe/startnoui.c
Expand Up @@ -25,6 +25,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "fontforgevw.h"
#include "scripting.h"

#ifndef _NO_LIBUNICODENAMES
#include <libunicodenames.h> /* need to open a database when we start */
extern uninm_names_db names_db; /* Unicode character names and annotations database */
Expand Down
2 changes: 2 additions & 0 deletions fontforgeexe/startui.c
Expand Up @@ -34,6 +34,7 @@
#include "encoding.h"
#include "fontforgeui.h"
#include "lookups.h"

#ifndef _NO_LIBUNICODENAMES
#include <libunicodenames.h> /* need to open a database when we start */
extern uninm_names_db names_db; /* Unicode character names and annotations database */
Expand Down Expand Up @@ -102,6 +103,7 @@ extern void setup_cocoa_app();
#endif

#include "collabclientui.h"
#include "scripting.h"

extern int AutoSaveFrequency;
int splash = 1;
Expand Down
1 change: 1 addition & 0 deletions fontforgeexe/windowmenu.c
Expand Up @@ -30,6 +30,7 @@
#include "basics.h"
#include <gfile.h>
#include "splinefont.h"
#include "scripting.h"
#include "ustring.h"

static void WindowSelect(GWindow base,struct gmenuitem *mi,GEvent *e) {
Expand Down

0 comments on commit 26efe37

Please sign in to comment.