mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-25 13:37:02 +03:00
Ensure variables are declared correctly
This commit is contained in:
parent
df2b14ed5f
commit
88ae1ff267
@ -68,7 +68,7 @@ enum
|
|||||||
RX_HOTLIST
|
RX_HOTLIST
|
||||||
};
|
};
|
||||||
|
|
||||||
Object *arexx_obj = NULL;
|
static Object *arexx_obj = NULL;
|
||||||
STATIC char result[100];
|
STATIC char result[100];
|
||||||
|
|
||||||
STATIC VOID rx_open(struct ARexxCmd *, struct RexxMsg *);
|
STATIC VOID rx_open(struct ARexxCmd *, struct RexxMsg *);
|
||||||
|
@ -78,7 +78,7 @@ enum {
|
|||||||
AMI_NSBM_PALETTEMAPPED
|
AMI_NSBM_PALETTEMAPPED
|
||||||
};
|
};
|
||||||
|
|
||||||
APTR pool_bitmap = NULL;
|
static APTR pool_bitmap = NULL;
|
||||||
|
|
||||||
/* exported function documented in amiga/bitmap.h */
|
/* exported function documented in amiga/bitmap.h */
|
||||||
void *amiga_bitmap_create(int width, int height, unsigned int state)
|
void *amiga_bitmap_create(int width, int height, unsigned int state)
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#define AMI_BITMAP_FORMAT RGBFB_R8G8B8A8
|
#define AMI_BITMAP_FORMAT RGBFB_R8G8B8A8
|
||||||
#define AMI_BITMAP_SCALE_ICON 0xFF
|
#define AMI_BITMAP_SCALE_ICON 0xFF
|
||||||
|
|
||||||
struct gui_bitmap_table *amiga_bitmap_table;
|
extern struct gui_bitmap_table *amiga_bitmap_table;
|
||||||
struct bitmap;
|
struct bitmap;
|
||||||
struct nsurl;
|
struct nsurl;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
#define ID_UTF8 MAKE_ID('U','T','F','8')
|
#define ID_UTF8 MAKE_ID('U','T','F','8')
|
||||||
|
|
||||||
struct IFFHandle *iffh = NULL;
|
static struct IFFHandle *iffh = NULL;
|
||||||
|
|
||||||
static struct IFFHandle *ami_clipboard_init_internal(int unit)
|
static struct IFFHandle *ami_clipboard_init_internal(int unit)
|
||||||
{
|
{
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
#include "amiga/cookies.h"
|
#include "amiga/cookies.h"
|
||||||
#include "amiga/tree.h"
|
#include "amiga/tree.h"
|
||||||
|
|
||||||
|
struct treeview_window *cookies_window;
|
||||||
|
|
||||||
void ami_cookies_initialise(void)
|
void ami_cookies_initialise(void)
|
||||||
{
|
{
|
||||||
cookies_window = ami_tree_create(TREE_COOKIES, NULL);
|
cookies_window = ami_tree_create(TREE_COOKIES, NULL);
|
||||||
|
@ -24,5 +24,5 @@
|
|||||||
void ami_cookies_initialise(void);
|
void ami_cookies_initialise(void);
|
||||||
void ami_cookies_free(void);
|
void ami_cookies_free(void);
|
||||||
|
|
||||||
struct treeview_window *cookies_window;
|
extern struct treeview_window *cookies_window;
|
||||||
#endif
|
#endif
|
||||||
|
@ -89,7 +89,7 @@ enum {
|
|||||||
AMINS_DLOAD_ABORT,
|
AMINS_DLOAD_ABORT,
|
||||||
};
|
};
|
||||||
|
|
||||||
int downloads_in_progress = 0;
|
static int downloads_in_progress = 0;
|
||||||
|
|
||||||
static struct gui_download_window *gui_download_window_create(download_context *ctx,
|
static struct gui_download_window *gui_download_window_create(download_context *ctx,
|
||||||
struct gui_window *gui)
|
struct gui_window *gui)
|
||||||
|
@ -59,7 +59,7 @@ typedef struct amiga_dt_anim_content {
|
|||||||
int h;
|
int h;
|
||||||
} amiga_dt_anim_content;
|
} amiga_dt_anim_content;
|
||||||
|
|
||||||
APTR ami_colormap_to_clut(struct ColorMap *cmap);
|
static APTR ami_colormap_to_clut(struct ColorMap *cmap);
|
||||||
|
|
||||||
static nserror amiga_dt_anim_create(const content_handler *handler,
|
static nserror amiga_dt_anim_create(const content_handler *handler,
|
||||||
lwc_string *imime_type, const struct http_parameter *params,
|
lwc_string *imime_type, const struct http_parameter *params,
|
||||||
@ -339,7 +339,7 @@ content_type amiga_dt_anim_content_type(void)
|
|||||||
return CONTENT_IMAGE;
|
return CONTENT_IMAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
APTR ami_colormap_to_clut(struct ColorMap *cmap)
|
static APTR ami_colormap_to_clut(struct ColorMap *cmap)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
UBYTE *clut = ami_misc_allocvec_clear(256 * 4, 0); /* NB: Was not MEMF_PRIVATE */
|
UBYTE *clut = ami_misc_allocvec_clear(256 * 4, 0); /* NB: Was not MEMF_PRIVATE */
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
* filetype -- determine the MIME type of a local file
|
* filetype -- determine the MIME type of a local file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct MinList *ami_mime_list = NULL;
|
static struct MinList *ami_mime_list = NULL;
|
||||||
|
|
||||||
struct ami_mime_entry
|
struct ami_mime_entry
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,7 @@ struct ami_font_functions {
|
|||||||
|
|
||||||
const struct ami_font_functions *ami_nsfont;
|
const struct ami_font_functions *ami_nsfont;
|
||||||
|
|
||||||
struct gui_layout_table *ami_layout_table;
|
extern struct gui_layout_table *ami_layout_table;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ const uint16 sc_table[] = {
|
|||||||
#endif
|
#endif
|
||||||
0, 0};
|
0, 0};
|
||||||
|
|
||||||
lwc_string *glypharray[0xffff + 1];
|
static lwc_string *glypharray[0xffff + 1];
|
||||||
|
|
||||||
static struct List ami_diskfontlib_list;
|
static struct List ami_diskfontlib_list;
|
||||||
|
|
||||||
|
@ -232,16 +232,18 @@ struct ami_gui_opts_window {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
char *current_user_options = NULL;
|
||||||
|
|
||||||
static struct ami_gui_opts_window *gow = NULL;
|
static struct ami_gui_opts_window *gow = NULL;
|
||||||
|
|
||||||
CONST_STRPTR tabs[OPTS_MAX_TABS];
|
static CONST_STRPTR tabs[OPTS_MAX_TABS];
|
||||||
static STRPTR screenopts[OPTS_MAX_SCREEN];
|
static STRPTR screenopts[OPTS_MAX_SCREEN];
|
||||||
CONST_STRPTR proxyopts[OPTS_MAX_PROXY];
|
static CONST_STRPTR proxyopts[OPTS_MAX_PROXY];
|
||||||
CONST_STRPTR nativebmopts[OPTS_MAX_NATIVEBM];
|
static CONST_STRPTR nativebmopts[OPTS_MAX_NATIVEBM];
|
||||||
CONST_STRPTR ditheropts[OPTS_MAX_DITHER];
|
static CONST_STRPTR ditheropts[OPTS_MAX_DITHER];
|
||||||
CONST_STRPTR fontopts[6];
|
static CONST_STRPTR fontopts[6];
|
||||||
CONST_STRPTR gadlab[OPTS_LAST];
|
static CONST_STRPTR gadlab[OPTS_LAST];
|
||||||
struct List *websearch_list;
|
static struct List *websearch_list;
|
||||||
|
|
||||||
#ifndef __amigaos4__
|
#ifndef __amigaos4__
|
||||||
static void ami_gui_opts_array_to_list(struct List *list, const char *array[], int type)
|
static void ami_gui_opts_array_to_list(struct List *list, const char *array[], int type)
|
||||||
|
@ -27,6 +27,6 @@ void ami_gui_opts_close(void);
|
|||||||
struct List *ami_gui_opts_websearch(void);
|
struct List *ami_gui_opts_websearch(void);
|
||||||
void ami_gui_opts_websearch_free(struct List *websearchlist);
|
void ami_gui_opts_websearch_free(struct List *websearchlist);
|
||||||
|
|
||||||
char *current_user_options;
|
extern char *current_user_options;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
/* AmigaGuide class */
|
/* AmigaGuide class */
|
||||||
#include "amiga/agclass/amigaguide_class.h"
|
#include "amiga/agclass/amigaguide_class.h"
|
||||||
|
|
||||||
Class *AmigaGuideClass = NULL;
|
static Class *AmigaGuideClass = NULL;
|
||||||
Object *AmigaGuideObject = NULL;
|
static Object *AmigaGuideObject = NULL;
|
||||||
|
|
||||||
/* This array needs to match the enum in help.h */
|
/* This array needs to match the enum in help.h */
|
||||||
CONST_STRPTR context_nodes[] = {
|
CONST_STRPTR context_nodes[] = {
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
#include "amiga/tree.h"
|
#include "amiga/tree.h"
|
||||||
#include "amiga/tree.h"
|
#include "amiga/tree.h"
|
||||||
|
|
||||||
|
struct treeview_window *global_history_window = NULL;
|
||||||
|
|
||||||
void ami_global_history_initialise(void)
|
void ami_global_history_initialise(void)
|
||||||
{
|
{
|
||||||
global_history_window = ami_tree_create(TREE_HISTORY, NULL);
|
global_history_window = ami_tree_create(TREE_HISTORY, NULL);
|
||||||
|
@ -25,5 +25,5 @@
|
|||||||
void ami_global_history_initialise(void);
|
void ami_global_history_initialise(void);
|
||||||
void ami_global_history_free(void);
|
void ami_global_history_free(void);
|
||||||
|
|
||||||
struct treeview_window *global_history_window;
|
extern struct treeview_window *global_history_window;
|
||||||
#endif
|
#endif
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
#include "amiga/gui.h"
|
#include "amiga/gui.h"
|
||||||
#include "amiga/history_local.h"
|
#include "amiga/history_local.h"
|
||||||
|
|
||||||
void ami_history_update_extent(struct history_window *hw);
|
static void ami_history_update_extent(struct history_window *hw);
|
||||||
HOOKF(void, ami_history_scroller_hook, Object *, object, struct IntuiMessage *);
|
HOOKF(void, ami_history_scroller_hook, Object *, object, struct IntuiMessage *);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -295,7 +295,7 @@ BOOL ami_history_event(struct history_window *hw)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ami_history_update_extent(struct history_window *hw)
|
static void ami_history_update_extent(struct history_window *hw)
|
||||||
{
|
{
|
||||||
struct IBox *bbox;
|
struct IBox *bbox;
|
||||||
int width, height;
|
int width, height;
|
||||||
|
@ -37,6 +37,7 @@ struct ami_hotlist_ctx {
|
|||||||
bool (*cb)(void *userdata, int level, int item, const char *title, nsurl *url, bool folder);
|
bool (*cb)(void *userdata, int level, int item, const char *title, nsurl *url, bool folder);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct treeview_window *hotlist_window = NULL;
|
||||||
|
|
||||||
void ami_hotlist_initialise(const char *hotlist_file)
|
void ami_hotlist_initialise(const char *hotlist_file)
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
struct nsurl;
|
struct nsurl;
|
||||||
struct treeview_window;
|
struct treeview_window;
|
||||||
|
|
||||||
struct treeview_window *hotlist_window;
|
extern struct treeview_window *hotlist_window;
|
||||||
|
|
||||||
void ami_hotlist_initialise(const char *hotlist_file);
|
void ami_hotlist_initialise(const char *hotlist_file);
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
#define THUMBNAIL_WIDTH 100 /* Icon sizes for thumbnails, usually the same as */
|
#define THUMBNAIL_WIDTH 100 /* Icon sizes for thumbnails, usually the same as */
|
||||||
#define THUMBNAIL_HEIGHT 86 /* WIDTH/HEIGHT in desktop/thumbnail.c */
|
#define THUMBNAIL_HEIGHT 86 /* WIDTH/HEIGHT in desktop/thumbnail.c */
|
||||||
|
|
||||||
ULONG *amiga_icon_convertcolouricon32(UBYTE *icondata, ULONG width, ULONG height,
|
static ULONG *amiga_icon_convertcolouricon32(UBYTE *icondata, ULONG width, ULONG height,
|
||||||
ULONG trans, ULONG pals1, struct ColorRegister *pal1, int alpha);
|
ULONG trans, ULONG pals1, struct ColorRegister *pal1, int alpha);
|
||||||
|
|
||||||
#ifdef WITH_AMIGA_ICON
|
#ifdef WITH_AMIGA_ICON
|
||||||
@ -314,7 +314,7 @@ content_type amiga_icon_content_type(void)
|
|||||||
|
|
||||||
#endif /* WITH_AMIGA_ICON */
|
#endif /* WITH_AMIGA_ICON */
|
||||||
|
|
||||||
ULONG *amiga_icon_convertcolouricon32(UBYTE *icondata, ULONG width, ULONG height,
|
static ULONG *amiga_icon_convertcolouricon32(UBYTE *icondata, ULONG width, ULONG height,
|
||||||
ULONG trans, ULONG pals1, struct ColorRegister *pal1, int alpha)
|
ULONG trans, ULONG pals1, struct ColorRegister *pal1, int alpha)
|
||||||
{
|
{
|
||||||
ULONG *argbicon;
|
ULONG *argbicon;
|
||||||
|
@ -36,8 +36,8 @@
|
|||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct ColorRegister cm[1000];
|
static struct ColorRegister cm[1000];
|
||||||
ULONG numcols;
|
static ULONG numcols;
|
||||||
|
|
||||||
static ULONG findcolour(ULONG newcol)
|
static ULONG findcolour(ULONG newcol)
|
||||||
{
|
{
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
struct Library *OpenURLBase = NULL;
|
struct Library *OpenURLBase = NULL;
|
||||||
struct OpenURLIFace *IOpenURL = NULL;
|
struct OpenURLIFace *IOpenURL = NULL;
|
||||||
|
|
||||||
struct MinList *ami_unsupportedprotocols;
|
static struct MinList *ami_unsupportedprotocols;
|
||||||
|
|
||||||
struct ami_protocol
|
struct ami_protocol
|
||||||
{
|
{
|
||||||
|
@ -87,12 +87,16 @@ enum {
|
|||||||
NSA_GLYPH_MAX
|
NSA_GLYPH_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
BOOL menualreadyinit;
|
struct gui_window_2 *ami_menu_window_close = NULL;
|
||||||
|
bool ami_menu_check_toggled = false;
|
||||||
|
|
||||||
|
static BOOL menualreadyinit;
|
||||||
|
static Object *menu_glyph[NSA_GLYPH_MAX];
|
||||||
|
static int menu_glyph_width[NSA_GLYPH_MAX];
|
||||||
|
static bool menu_glyphs_loaded = false;
|
||||||
|
|
||||||
const char * const netsurf_version;
|
const char * const netsurf_version;
|
||||||
const char * const verdate;
|
const char * const verdate;
|
||||||
Object *menu_glyph[NSA_GLYPH_MAX];
|
|
||||||
int menu_glyph_width[NSA_GLYPH_MAX];
|
|
||||||
bool menu_glyphs_loaded = false;
|
|
||||||
|
|
||||||
static nserror ami_menu_scan(struct tree *tree, struct gui_window_2 *gwin);
|
static nserror ami_menu_scan(struct tree *tree, struct gui_window_2 *gwin);
|
||||||
void ami_menu_arexx_scan(struct gui_window_2 *gwin);
|
void ami_menu_arexx_scan(struct gui_window_2 *gwin);
|
||||||
|
@ -135,8 +135,8 @@ enum {
|
|||||||
struct gui_window;
|
struct gui_window;
|
||||||
struct gui_window_2;
|
struct gui_window_2;
|
||||||
|
|
||||||
struct gui_window_2 *ami_menu_window_close;
|
extern struct gui_window_2 *ami_menu_window_close;
|
||||||
bool ami_menu_check_toggled;
|
extern bool ami_menu_check_toggled;
|
||||||
|
|
||||||
void ami_free_menulabs(struct gui_window_2 *gwin);
|
void ami_free_menulabs(struct gui_window_2 *gwin);
|
||||||
struct Menu *ami_menu_create(struct gui_window_2 *gwin);
|
struct Menu *ami_menu_create(struct gui_window_2 *gwin);
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#define NewnsList NewList
|
#define NewnsList NewList
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
APTR pool_nsobj = NULL;
|
static APTR pool_nsobj = NULL;
|
||||||
|
|
||||||
bool ami_object_init(void)
|
bool ami_object_init(void)
|
||||||
{
|
{
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
struct gui_window;
|
struct gui_window;
|
||||||
struct form_control;
|
struct form_control;
|
||||||
|
|
||||||
BOOL popupmenu_lib_ok;
|
|
||||||
|
|
||||||
void gui_create_form_select_menu(struct gui_window *g, struct form_control *control);
|
void gui_create_form_select_menu(struct gui_window *g, struct form_control *control);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,9 +51,12 @@
|
|||||||
#include "amiga/theme.h"
|
#include "amiga/theme.h"
|
||||||
#include "amiga/misc.h"
|
#include "amiga/misc.h"
|
||||||
|
|
||||||
struct BitMap *throbber = NULL;
|
ULONG throbber_width;
|
||||||
struct bitmap *throbber_nsbm = NULL;
|
ULONG throbber_height;
|
||||||
int throbber_frames, throbber_update_interval;
|
|
||||||
|
static struct BitMap *throbber = NULL;
|
||||||
|
static struct bitmap *throbber_nsbm = NULL;
|
||||||
|
static int throbber_frames, throbber_update_interval;
|
||||||
static Object *mouseptrobj[AMI_LASTPOINTER+1];
|
static Object *mouseptrobj[AMI_LASTPOINTER+1];
|
||||||
static struct BitMap *mouseptrbm[AMI_LASTPOINTER+1];
|
static struct BitMap *mouseptrbm[AMI_LASTPOINTER+1];
|
||||||
|
|
||||||
|
@ -28,7 +28,8 @@ struct gui_window;
|
|||||||
#define AMI_GUI_POINTER_DRAG GUI_POINTER_PROGRESS+2
|
#define AMI_GUI_POINTER_DRAG GUI_POINTER_PROGRESS+2
|
||||||
#define AMI_LASTPOINTER AMI_GUI_POINTER_DRAG
|
#define AMI_LASTPOINTER AMI_GUI_POINTER_DRAG
|
||||||
|
|
||||||
ULONG throbber_width, throbber_height;
|
extern ULONG throbber_width;
|
||||||
|
extern ULONG throbber_height;
|
||||||
|
|
||||||
void ami_theme_init(void);
|
void ami_theme_init(void);
|
||||||
void ami_get_theme_filename(char *filename, const char *themestring, bool protocol);
|
void ami_get_theme_filename(char *filename, const char *themestring, bool protocol);
|
||||||
|
Loading…
Reference in New Issue
Block a user