NetSurf
|
Compatibility functions for AmigaOS 3. More...
#include "os3support.h"
#include <inttypes.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <proto/bullet.h>
#include <proto/exec.h>
#include <proto/intuition.h>
#include <proto/dos.h>
#include <proto/utility.h>
#include <diskfont/diskfont.h>
#include <diskfont/diskfonttag.h>
#include <intuition/gadgetclass.h>
#include "utils/log.h"
Go to the source code of this file.
Data Structures | |
struct | FormatContext |
Macros | |
#define | SUCCESS (TRUE) |
#define | FAILURE (FALSE) |
#define | NO ! |
Functions | |
STATIC VOID ASM | StuffChar (REG(a3, struct FormatContext *Context), REG(d0, UBYTE Char)) |
BOOL | VSPrintfN (LONG MaxLen, STRPTR Buffer, const STRPTR FormatString, const va_list VarArgs) |
BOOL | SPrintfN (LONG MaxLen, STRPTR Buffer, const STRPTR FormatString,...) |
char * | ASPrintf (const char *fmt,...) |
char * | strlwr (char *str) |
char * | strsep (char **s1, const char *s2) |
int | alphasort (const struct dirent **d1, const struct dirent **d2) |
int | scandir (const char *dir, struct dirent ***namelist, int(*filter)(const struct dirent *), int(*compar)(const struct dirent **, const struct dirent **)) |
long long int | strtoll (const char *nptr, char **endptr, int base) |
struct OutlineFont * | OpenOutlineFont (STRPTR fileName, struct List *list, ULONG flags) |
void | CloseOutlineFont (struct OutlineFont *of, struct List *list) |
int64 | GetFileSize (BPTR fh) |
void | FreeSysObject (ULONG type, APTR obj) |
struct Node * | GetHead (struct List *list) |
struct Node * | GetPred (struct Node *node) |
struct Node * | GetSucc (struct Node *node) |
uint32 | GetAttrs (Object *obj, Tag tag1,...) |
ULONG | RefreshSetGadgetAttrsA (struct Gadget *g, struct Window *w, struct Requester *r, struct TagItem *tags) |
ULONG | RefreshSetGadgetAttrs (struct Gadget *g, struct Window *w, struct Requester *r, Tag tag1,...) |
APTR | NewObject (struct IClass *classPtr, CONST_STRPTR classID, ULONG tagList,...) |
Compatibility functions for AmigaOS 3.
Definition in file os3support.c.
#define FAILURE (FALSE) |
Definition at line 45 of file os3support.c.
#define NO ! |
Definition at line 46 of file os3support.c.
#define SUCCESS (TRUE) |
Definition at line 44 of file os3support.c.
int alphasort | ( | const struct dirent ** | d1, |
const struct dirent ** | d2 | ||
) |
Definition at line 184 of file os3support.c.
char * ASPrintf | ( | const char * | fmt, |
... | |||
) |
Definition at line 139 of file os3support.c.
References buffer, and VSPrintfN().
Referenced by ami_download_check_overwrite(), ami_gui_commandline(), ami_gui_get_cache_favicon_name(), ami_gui_get_screen_title(), ami_gui_get_user_dir(), ami_gui_hotlist_add(), ami_gui_opts_open(), ami_gui_read_tooltypes(), ami_locale_langs(), ami_menu_hotlist_add(), ami_nsoption_set_location(), amiga_plugin_hack_execute(), amiga_warn_user(), amiga_warn_user_multi(), gui_init2(), gui_launch_url(), gui_window_save_link(), HOOKF(), main(), OpenOutlineFont(), and utf8_to_local_encoding().
void CloseOutlineFont | ( | struct OutlineFont * | of, |
struct List * | list | ||
) |
Definition at line 323 of file os3support.c.
References OutlineFont::BulletBase, OutlineFont::GEngine, OutlineFont::olf_OTagList, and OutlineFont::OTagPath.
Referenced by ami_font_bullet_close(), and ami_font_scan_font().
void FreeSysObject | ( | ULONG | type, |
APTR | obj | ||
) |
Definition at line 350 of file os3support.c.
References ASOT_IOREQUEST, ASOT_PORT, and type.
Referenced by ami_gui_resources_free(), ami_print_close_device(), ami_print_free(), ami_schedule_close_timer(), amiga_bitmap_destroy(), schedule_remove(), and schedule_remove_all().
uint32 GetAttrs | ( | Object * | obj, |
Tag | tag1, | ||
... | |||
) |
Definition at line 389 of file os3support.c.
Referenced by ami_gadget_hit(), ami_gui_event(), and ami_gui_splash_open().
int64 GetFileSize | ( | BPTR | fh | ) |
Definition at line 337 of file os3support.c.
Referenced by ami_download_check_overwrite(), and OpenOutlineFont().
struct Node * GetHead | ( | struct List * | list | ) |
Definition at line 364 of file os3support.c.
Referenced by ami_cw_redraw_queue(), ami_find_tab(), ami_find_tab_bw(), ami_find_tab_gwin(), ami_font_cache_cleanup(), ami_font_scan_font(), ami_font_scan_fonts(), ami_font_width_glyph(), ami_free_download_list(), ami_gui_close_tabs(), ami_gui_count_windows(), ami_gui_hotlist_toolbar_free(), ami_gui_hotlist_update_all(), ami_gui_menu_update_all(), ami_gui_opts_free_list(), ami_gui_opts_websearch_free(), ami_gui_tabs_toggle_all(), ami_gui_window_update_box_deferred(), ami_gui_window_update_box_deferred_check(), ami_handle_msg(), ami_mime_entry_locate(), ami_openurl_check_list(), ami_openurl_free_list(), ami_plot_release_pens(), ami_quit_netsurf(), FreeObjList(), gui_search_web_provider_update(), and RXHOOKF().
struct Node * GetPred | ( | struct Node * | node | ) |
Definition at line 375 of file os3support.c.
Referenced by ami_change_tab(), and gui_window_destroy().
struct Node * GetSucc | ( | struct Node * | node | ) |
Definition at line 381 of file os3support.c.
Referenced by ami_change_tab(), ami_cw_redraw_queue(), ami_find_tab(), ami_find_tab_bw(), ami_find_tab_gwin(), ami_font_cache_cleanup(), ami_font_scan_font(), ami_font_scan_fonts(), ami_free_download_list(), ami_gui_close_tabs(), ami_gui_count_windows(), ami_gui_hotlist_toolbar_free(), ami_gui_hotlist_update_all(), ami_gui_menu_update_all(), ami_gui_opts_free_list(), ami_gui_opts_websearch_free(), ami_gui_tabs_toggle_all(), ami_gui_window_update_box_deferred(), ami_gui_window_update_box_deferred_check(), ami_handle_msg(), ami_mime_entry_locate(), ami_openurl_check_list(), ami_openurl_free_list(), ami_plot_release_pens(), ami_quit_netsurf(), FreeObjList(), gui_download_window_done(), gui_search_web_provider_update(), gui_window_destroy(), and RXHOOKF().
APTR NewObject | ( | struct IClass * | classPtr, |
CONST_STRPTR | classID, | ||
ULONG | tagList, | ||
... | |||
) |
Definition at line 434 of file os3support.c.
Referenced by ami_help_init(), ami_init_mouse_pointers(), ami_menu_layout_gt(), ami_menu_load_glyphs(), and gui_window_create().
struct OutlineFont * OpenOutlineFont | ( | STRPTR | fileName, |
struct List * | list, | ||
ULONG | flags | ||
) |
Definition at line 204 of file os3support.c.
References ASPrintf(), buffer, OutlineFont::BulletBase, OutlineFont::GEngine, GetFileSize(), NSLOG, OutlineFont::olf_OTagList, and OutlineFont::OTagPath.
Referenced by ami_font_open(), and ami_font_scan_font().
ULONG RefreshSetGadgetAttrs | ( | struct Gadget * | g, |
struct Window * | w, | ||
struct Requester * | r, | ||
Tag | tag1, | ||
... | |||
) |
Definition at line 429 of file os3support.c.
References RefreshSetGadgetAttrsA().
Referenced by ami_change_tab(), ami_corewindow_init(), ami_cw_newsize(), ami_cw_set_scroll(), ami_cw_update_size(), ami_drag_selection(), ami_font_scan_gui_update(), ami_gui_console_log_switch(), ami_gui_opts_event(), ami_gui_switch_to_new_tab(), ami_gui_update_hotlist_button(), ami_print_next_page(), ami_search_event(), ami_search_set_back_state(), ami_search_set_forward_state(), ami_set_border_gadget_size(), ami_switch_tab(), gui_download_window_data(), gui_page_info_change(), gui_search_web_provider_update(), gui_window_console_log(), gui_window_create(), gui_window_destroy(), gui_window_set_scroll(), gui_window_set_title(), gui_window_set_url(), and gui_window_update_extent().
ULONG RefreshSetGadgetAttrsA | ( | struct Gadget * | g, |
struct Window * | w, | ||
struct Requester * | r, | ||
struct TagItem * | tags | ||
) |
Definition at line 408 of file os3support.c.
Referenced by RefreshSetGadgetAttrs().
int scandir | ( | const char * | dir, |
struct dirent *** | namelist, | ||
int(*)(const struct dirent *) | filter, | ||
int(*)(const struct dirent **, const struct dirent **) | compar | ||
) |
Definition at line 190 of file os3support.c.
Referenced by fetch_file_process_dir().
BOOL SPrintfN | ( | LONG | MaxLen, |
STRPTR | Buffer, | ||
const STRPTR | FormatString, | ||
... | |||
) |
Definition at line 119 of file os3support.c.
References FAILURE, result, and VSPrintfN().
char * strlwr | ( | char * | str | ) |
Definition at line 160 of file os3support.c.
Referenced by ami_mime_guess_add_datatype().
char * strsep | ( | char ** | s1, |
const char * | s2 | ||
) |
Definition at line 171 of file os3support.c.
Referenced by ami_font_scan_init().
long long int strtoll | ( | const char * | nptr, |
char ** | endptr, | ||
int | base | ||
) |
Definition at line 198 of file os3support.c.
References base.
Referenced by ascii_string_to_int(), and nsc_snptimet().
STATIC VOID ASM StuffChar | ( | REG(a3, struct FormatContext *Context) | , |
REG(d0, UBYTE Char) | |||
) |
Definition at line 57 of file os3support.c.
References FormatContext::Index, FormatContext::Overflow, and FormatContext::Size.
Referenced by VSPrintfN().
BOOL VSPrintfN | ( | LONG | MaxLen, |
STRPTR | Buffer, | ||
const STRPTR | FormatString, | ||
const va_list | VarArgs | ||
) |
Definition at line 86 of file os3support.c.
References FAILURE, FormatContext::Index, NO, FormatContext::Overflow, result, FormatContext::Size, StuffChar(), and SUCCESS.
Referenced by ASPrintf(), and SPrintfN().