diff --git a/h/Authorise b/h/Authorise index a120de9482ae6037eee093ba4f537cc8313b7a9f..2af0f6c76d401c81905bd1450a56ffeec6e630b6 100644 --- a/h/Authorise +++ b/h/Authorise @@ -14,8 +14,12 @@ */ /***************************************************/ /* File : Authorise.h */ +/* */ /* Purpose: Browser remote authorisation services. */ +/* (aka. authentication). */ +/* */ /* Author : A.D.Hodgkinson */ +/* */ /* History: 24-Apr-97: Created. */ /***************************************************/ diff --git a/h/Bitfields b/h/Bitfields index 3328bfa1db3257d48d0df69e534ae3a01712a748..f6864046db4ab7d81c6e29e9218f3ef5da3ab8b9 100644 --- a/h/Bitfields +++ b/h/Bitfields @@ -14,17 +14,24 @@ */ /***************************************************/ /* File : Bitfields.h */ +/* */ /* Purpose: A few macros and definitions to handle */ -/* large bitfields (e.g. 256 bits), */ -/* created originally for recording used */ -/* font handles. */ +/* large bitfields, created originally */ +/* for recording used font handles. */ +/* */ /* Author : A.D.Hodgkinson, adapted from the */ -/* TCPIPLibs source sys/types.h. */ -/* History: 10-Mar-97: Created */ +/* TCPIPLibs source sys/types.h */ +/* */ +/* History: 10-Mar-97: Created. */ +/* 16-Apr-97: Modified to vary the size */ +/* of the bitfield according */ +/* to Limits_OS_FontHandles. */ /***************************************************/ +#include "Limits.h" + #define Bits_In_A_Byte 8 -#define Bitfield_Size 256 +#define Bitfield_Size Limits_OS_FontHandles typedef long bitfield_mask; diff --git a/h/Browser b/h/Browser index a8f84c465db22b3f83276c5b27af5f235bf0b489..65cf26b501bae7ff665633277966fcaa95afc2fd 100644 --- a/h/Browser +++ b/h/Browser @@ -14,9 +14,12 @@ */ /***************************************************/ /* File : Browser.h */ +/* */ /* Purpose: Browser window services. */ +/* */ /* Author : A.D.Hodgkinson */ -/* History: 15-Mar-97: Created from Windows.h */ +/* */ +/* History: 15-Mar-97: Created from Windows.h. */ /***************************************************/ /* Definitions */ diff --git a/h/Cookies b/h/Cookies index 1638c05521cf6a053384209c3aef13e1ae05a6c5..f97249bd5bf2f5d99c482ecb6f8a5b17e20fea4a 100644 --- a/h/Cookies +++ b/h/Cookies @@ -12,11 +12,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/*************************************************/ -/* File : Cookies.h */ -/* Purpose: Browser-end HTTP Cookie support. */ -/* Author : A.D.Hodgkinson */ -/* History: 28-Jul-96: Created */ -/*************************************************/ +/***************************************************/ +/* File : Cookies.h */ +/* */ +/* Purpose: Browser-end HTTP Cookie support. */ +/* */ +/* Author : A.D.Hodgkinson */ +/* */ +/* History: 28-Jul-96: Created. */ +/***************************************************/ + +/* Function prototypes */ _kernel_oserror * cookies_process_cookie (browser_data * b); diff --git a/h/Fetch b/h/Fetch index c3f710e1f08b66642887e77df57708d5d6ac2a66..782b0e6369a3a8c51d0634816d2961be715ee24c 100644 --- a/h/Fetch +++ b/h/Fetch @@ -14,16 +14,22 @@ */ /***************************************************/ /* File : Fetch.h */ -/* Purpose: Low-level page fetch related functions */ -/* functions (as opposed to fetch.c where */ -/* all the higher level stuff goes on) */ +/* */ +/* Purpose: Mid-level fetch functions, concerned */ +/* mostly with HStreams but not low level */ +/* HTMLLib interfacing. Compare with */ +/* FetchPage.h, which provides a much */ +/* higher level interface. */ +/* */ /* Author : A.D.Hodgkinson */ -/* History: 25-Nov-96: Created */ +/* */ +/* History: 25-Nov-96: Created. */ +/* 17-Aug-97: Split up to form the */ +/* URLveneer.c and FetchHTML.c */ +/* sources. */ /***************************************************/ -/* Globals */ - -extern int authorising; +#include "URLstat.h" /* General definitions */ @@ -34,50 +40,6 @@ extern int authorising; #define Internal_URL "!INTRNL!" /* Special string (i.e. hack...) to mark a URL as internal only. */ #define Int_URL_Len 8 /* Saves having to strlen(Internal_URL) in various places. */ -/* URL module definitions */ - -#define URL_swibase 0x83e00 -#define URL_Register (URL_swibase+0) -#define URL_GetURL (URL_swibase+1) -#define URL_Status (URL_swibase+2) -#define URL_ReadData (URL_swibase+3) -#define URL_SetProxy (URL_swibase+4) -#define URL_Stop (URL_swibase+5) -#define URL_Deregister (URL_swibase+6) - -#define URL_Method_http_GET 1 -#define URL_Method_http_HEAD 2 -#define URL_Method_http_POST 4 -#define URL_Method_http_PUT 8 - -#define URL_Status_Connected 1 -#define URL_Status_SentReq 2 -#define URL_Status_SentData 4 -#define URL_Status_Responded 8 -#define URL_Status_Transfer 16 -#define URL_Status_Done 32 -#define URL_Status_Aborted 64 - -/* Local structures */ - -typedef struct urlstat -{ - int session; /* the fetch session handle */ - int fetched; /* flag indicates we have got at least one byte so far */ - void * context; /* parser context pointer */ - HStream * stream; /* pointer to the token stream */ - HStream * lasttoken; /* pointer to the last token returned */ - unsigned int fetching:1; /* flag indicates we are still fetching */ - unsigned int identified:1; /* the stream has been identified */ - unsigned int authorised:2; /* authorise: 0=not done, 1=doing, 2=done */ - unsigned int allowparse:1; /* whether to allow HTMLLib to parse this URL */ - int method; /* the method used to fetch */ - char * extradata; /* the extra data associated with this url */ - int type; /* type from HtmlIdentify */ - struct urlstat * next; - -} urlstat; - /* Function prototypes */ _kernel_oserror * fetch_start (browser_data * b); @@ -92,17 +54,4 @@ _kernel_oserror * fetch_cancel (browser_data * b); void fetch_stop (browser_data * b, int keep_source); void fetch_authorisation_proceed (browser_data * b, urlstat * context, char * realm, char * url); void fetch_authorisation_fail (browser_data * b); - -_kernel_oserror * html_get (char * url, char * extradata, int * handle, int method, char * user, int allowparse, int proxy); -int html_insert_header (char * header, flex_ptr data); -_kernel_oserror * html_close (unsigned int handle); -_kernel_oserror * html_get_next_token (browser_data * b, unsigned int handle, int * remaining, int * size, HStream ** token, int * waiting, flex_ptr store, char * url, int image); -_kernel_oserror * html_get_next_chunk (browser_data * b, unsigned int handle, char * buffer, int size, int * done, int * bytes); - -_kernel_oserror * url_register (unsigned int flags, unsigned int * handle); -_kernel_oserror * url_deregister (unsigned int flags, unsigned int handle); -_kernel_oserror * url_stop (unsigned int flags, unsigned int handle); -_kernel_oserror * url_get_url (unsigned int flags, unsigned int handle, int method, char * url, char * extradata, unsigned int * status, int mode); -_kernel_oserror * url_read_data (unsigned int flags, unsigned int handle, void * buffer, int size, int * status, int * read, int * pending); -_kernel_oserror * url_status (unsigned int flags, unsigned int handle, int * status, int * response, int * bytes); -_kernel_oserror * url_set_proxy (int flags, unsigned int session, char * baseurl, char * protocol, int noproxy); +_kernel_oserror * fetch_get_raw_data (browser_data * b, unsigned int handle, char * buffer, int size, int * done, int * bytes); diff --git a/h/FetchPage b/h/FetchPage index 79bdbef7e81fb734137db86ae804f980560ed329..e3ad8e6104f87a3f3878ae8a6d236390d50fc5a4 100644 --- a/h/FetchPage +++ b/h/FetchPage @@ -14,11 +14,15 @@ */ /***************************************************/ /* File : FetchPage.h */ -/* Purpose: High-level page fetch related */ -/* functions (as opposed to Fetch.h where */ -/* all the lower level stuff goes on). */ +/* */ +/* Purpose: High-level fetch functions; the main */ +/* interface for initiating and control- */ +/* ling full page fetches. Compare with */ +/* lower level Fetch.h and FetchHTML.h. */ +/* */ /* Author : A.D.Hodgkinson */ -/* History: 25-Nov-96: Created */ +/* */ +/* History: 25-Nov-96: Created. */ /***************************************************/ /* Function prototypes */ diff --git a/h/FontManage b/h/FontManage index 68b719ae904440e15e78e31bca905ee0fcef73a6..06087ddeee45806d1c4d66ff80b26f506a76e6fa 100644 --- a/h/FontManage +++ b/h/FontManage @@ -14,10 +14,13 @@ */ /***************************************************/ /* File : FontManage.h */ -/* Purpose: A range of veneers for font management */ +/* */ +/* Purpose: A range of font management veneers. */ +/* */ /* Author : Merlyn Kline for Customer browser */ /* This source adapted by A.D.Hodgkinson */ -/* History: 05-Dec-96: Created */ +/* */ +/* History: 05-Dec-96: Created. */ /***************************************************/ /* General definitions */ @@ -39,9 +42,9 @@ typedef struct fm_typeface { - char name [TypeNameLen]; /* Typeface name, in lower case */ - char fontnames [4] [FontNameLen]; /* RO fonts for normal, italic, bold & bold-italic */ - char alternative [TypeNameLen]; /* Name of the alternative typeface */ + char name [Limits_FaceName]; /* Typeface name, in lower case */ + char fontnames [4] [Limits_FontName]; /* RO fonts for normal, italic, bold & bold-italic */ + char alternative [Limits_FaceName]; /* Name of the alternative typeface */ } fm_typeface; diff --git a/h/Forms b/h/Forms index c8fb9d6e144d6886a6a9920d7f31562050abfc3e..93fabd7994121756e2eb405534d8be96ec6eab99 100644 --- a/h/Forms +++ b/h/Forms @@ -14,10 +14,13 @@ */ /***************************************************/ /* File : Forms.h */ +/* */ /* Purpose: Functions to manage HTML forms. */ +/* */ /* Author : Merlyn Kline for Customer browser */ /* This source adapted by A.D.Hodgkinson */ -/* History: 28-Jan-97: Created */ +/* */ +/* History: 28-Jan-97: Created. */ /***************************************************/ /* Various definitions */ diff --git a/h/Frames b/h/Frames index 0f6b6d4cfd80f91760638bfd16d0ff296cbc0555..6697d71933107534c63fe48602b9bcff72ba0143 100644 --- a/h/Frames +++ b/h/Frames @@ -14,19 +14,25 @@ */ /***************************************************/ /* File : Frames.h */ +/* */ /* Purpose: Frame handling functions for the */ /* browser. */ +/* */ /* Author : A.D.Hodgkinson */ -/* History: 19-Mar-97: Created */ +/* */ +/* History: 19-Mar-97: Created. */ /***************************************************/ /* Function prototypes */ _kernel_oserror * frames_define_frameset (browser_data * b, HStream * token); _kernel_oserror * frames_define_frame (browser_data * b, HStream * token); -_kernel_oserror * frames_resize_frameset (browser_data * b, WimpOpenWindowBlock * o); +_kernel_oserror * frames_resize_frameset (browser_data * b, BBox * new_outline); +_kernel_oserror * frames_resize_frame (browser_data * b, BBox * new_outline); +void frames_lock_frameset (browser_data * b); void frames_get_rc_info (browser_data * parent, int child, int * retrows, int * retcols, int * retrow, int * retcol); +_kernel_oserror * frames_find_pointer_in_frameset (browser_data * handle, int x, int y, int * retrow, int * retcol, int * offset_left, int * offset_top, int constrain); int frames_can_resize_top (browser_data * parent, int child); int frames_can_resize_bottom (browser_data * parent, int child); diff --git a/h/FromROSLib b/h/FromROSLib index 53b33c95e1b012c27313ea38c3643c0e35705084..3c60e8c876f4ea2270df868bd3404411c7645d6a 100644 --- a/h/FromROSLib +++ b/h/FromROSLib @@ -14,6 +14,7 @@ */ /***************************************************/ /* File : FromROSLib.h */ +/* */ /* Purpose: The original Customer browser sources */ /* used RISC_OSLib heavily and some of */ /* the functions used are handy to have */ @@ -23,9 +24,11 @@ /* both to fit into the browser more */ /* naturally, and to function better */ /* under C release 5. */ +/* */ /* Authors: Various for original RISC_OSLib source */ /* This source adapted by A.D.Hodgkinson */ -/* History: 06-Dec-96: Created */ +/* */ +/* History: 06-Dec-96: Created. */ /***************************************************/ /* VDU commands */ diff --git a/h/Global b/h/Global index a1ea47319ea4ae385f31ccf577cc675f80f0700b..82fa2c3abb049951f86ae9f995cf0baff666e7e9 100644 --- a/h/Global +++ b/h/Global @@ -12,12 +12,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/*************************************************/ -/* File : Global.h */ -/* Purpose: Holds all of the app's globals. */ -/* Author : A.D.Hodgkinson */ -/* History: 18-Oct-96: Created */ -/*************************************************/ +/***************************************************/ +/* File : Global.h */ +/* */ +/* Purpose: Holds all of the browser's globals. */ +/* */ +/* Author : A.D.Hodgkinson */ +/* */ +/* History: 18-Oct-96: Created. */ +/***************************************************/ #include "stdio.h" @@ -49,6 +52,8 @@ extern int quit; extern int modechanged; extern int printing; extern int printer_message_ref; +extern int drag_in_progress; +extern int authorising; extern void * dialler_pollword_address; @@ -62,15 +67,15 @@ extern int uri_module_present; extern MessagesFD meb; extern MessagesFD * chb; -extern char tokens[MaxMsgLen]; -extern char lasttokn[MaxLstLen]; +extern char tokens[Limits_Message]; +extern char lasttokn[Limits_Token]; extern int messages_list[]; extern IdBlock idb; extern int event_code_list[]; extern WimpPollBlock b; -extern char program_name[MaxPrgLen]; +extern char program_name[Limits_TaskName]; extern int null_counter; extern int bullets; @@ -200,9 +205,10 @@ typedef struct browser_data unsigned int current_frame; /* The currently displayed animation frame. */ int current_fetches; /* For frames, counts total still active fetches (so animation continues). */ /* */ - FILE * savefile; /* File handle for data saves. */ - int savetype; /* Filetype for data saves. */ - int savetransferred; /* Number of bytes done so far for in-memory transfers. */ + FILE * save_file; /* File handle for data saves. */ + int save_type; /* Filetype for data saves. */ + int save_transferred; /* Number of bytes done so far for in-memory transfers. */ + ObjectId save_dbox; /* Object ID of the save dialogue being used. */ /* */ int dialler_last; /* Time that the dialler online time was last updated. */ int meta_refresh_at; /* For META tags leading to a refresh, the time to start the fetch. */ @@ -254,8 +260,6 @@ typedef struct browser_data /* */ char * urlfdata; /* URL being fetched. */ char * urlddata; /* URL being displayed. */ - /* */ - int bytes_fetched; /* Number of bytes fetched so far, including image data. */ /* Special states */ @@ -320,6 +324,7 @@ typedef struct browser_data unsigned status_handler :1; /* Set to 1 if a handler for timeout on the status messages is registered. */ unsigned watching_resize:1; /* Zero if there is null events are not being claimed to watch the size of */ /* the window, or 1 if they are. */ + unsigned dragging :1; /* 1 if a drag on the page is in progress, else 0. */ /* */ unsigned savelink :1; /* 1: Save next fetch as data even if parsable, else parse it if possible. */ /* */ @@ -360,77 +365,72 @@ extern browser_data * highlight_frame; typedef struct global_choices { - int width; /* Default browser window width. */ - int height; /* Default browser window height. */ - int overridex; /* Possible X opening coordinate. */ - int overridey; /* Possible Y opening coordinate. */ - /* */ - char historyfile[MaxHstLen]; /* Default pathname to store global history. */ - char hotlistfile[MaxHotLen]; /* Default pathname to store hot list. */ - /* */ - #ifndef SINGLE_USER /* */ - /* */ - char username[20]; /* User name for multiuser operation. */ - char password[11]; /* Password name for multiuser operation. */ - /* */ - #endif /* */ - /* */ - char post_in [MaxPoILen]; /* Incoming mail path */ - char post_out[MaxPoOLen]; /* Outgoing mail path */ - /* */ - unsigned int col_back; /* Default background colour. */ - unsigned int col_text; /* Default text colour. */ - unsigned int col_link; /* Default link colour. */ - unsigned int col_used; /* Default used link colour. */ - unsigned int col_foll; /* Default following link colour. */ - unsigned int col_sele; /* Default selected (highlighted) link colour. */ - /* */ - int fontsize; /* Default font size, 16ths of a point. */ - /* */ - int leftmargin; /* Left hand basic page margin, millipoints. */ - int rightmargin; /* Right hand basic page margin, millipoints. */ - int quotemargin; /* Extra page margin for blockquote chunks, millipoints. */ - int leading; /* Line spacing, OS units. */ - int leftindent; /* Multiplier on list etc. indents, millipoints. */ - int minfrmheight; /* Minimum frame height, in OS units. */ - int minfrmwidth; /* Minimum frame width, in OS units. */ - /* */ - int refotime; /* Time to queue up reformats, in centiseconds, if 'refowait' is set. */ - /* */ - int maxghistory; /* Maximum size of global history, in K. */ - int maxvhistory; /* Maximum size of view history, in entries. */ - unsigned char maximages; /* Maximum number of images to fetch simultaneously. */ - /* */ - unsigned systemfont :1; /* 1: Use system font for everything, 0: use outline fonts. */ - unsigned delayimages :1; /* 1: Delay image loading, 0: Load them immediately. */ - unsigned displaybgs :1; /* 1: Display background images, 0: don't. */ - unsigned underlinelks :1; /* 1: Underline link text, 0: don't. */ - unsigned overridecols :1; /* 1: Ignore document specified colours (use defaults), 0: use doc's. */ - unsigned fixedptr :1; /* 1: Pointer must not change shape over page, 1: it can change. */ - unsigned highlightlks :1; /* 1: Objects are highlighted as the pointer moves over them. */ - unsigned keyboardctl :1; /* 1: Keyboard control of link selection enabled, else disabled. */ - unsigned clearfirst :1; /* 1: If popping up URL writable with key, clear first; else append. */ - unsigned keephighlight :1; /* 1: Frames will keep (re)highlighting as keyboard navigated. */ - /* */ - unsigned refowait :1; /* 1: Reformat requests are queued for 'refotime' centiseconds. */ - unsigned refohang :1; /* 1: Reformatter will wait to know image sizes before continuing. */ - unsigned brickwall :1; /* 1: Following links halts other fetches on page else they continue. */ - /* */ - unsigned url_bar :1; /* Attach a URL bar to a window upon creation (1 = yes, 0 = no). */ - unsigned button_bar :1; /* Attach a button bar to a window upon creation (1 = yes, 0 = no). */ - unsigned status_bar :1; /* Attach a status bar to a window upon creation (1 = yes, 0 = no). */ - unsigned show_urls :1; /* 0 - show titles in History menu, else always show URLs. */ - unsigned save_history :1; /* 0 - don't save global history on exit, else always save it. */ - unsigned save_hotlist :1; /* 0 - don't save hotlist on exit (losing any changes), else save it. */ - /* */ - unsigned move_gadgets :2; /* 0 - don't move, 1 - move after resize, 2 = move during resize. */ - unsigned anim_drift :1; /* 0 - stop animation as soon as idle, 1 = drift over to 1st frame. */ - /* */ - unsigned full_screen :1; /* 0 - don't start up Full Screen, else 1. */ - unsigned h_scroll :2; /* 0 - no hscroll in Full Screen, 1 - auto add/remove, 2 - always. */ - unsigned v_scroll :2; /* 0 - no vscroll in Full Screen, 1 - auto add/remove, 2 - always. */ - /* */ - unsigned use_proxy :1; /* 0 - don't use a proxy, 1 = use one at URL in Messages file entry. */ + int width; /* Default browser window width. */ + int height; /* Default browser window height. */ + int overridex; /* Possible X opening coordinate. */ + int overridey; /* Possible Y opening coordinate. */ + /* */ + #ifndef SINGLE_USER /* */ + /* */ + char username[Limits_Multi_UserName]; /* User name for multiuser operation. */ + char password[Limits_Multi_Password]; /* Password name for multiuser operation. */ + /* */ + #endif /* */ + /* */ + unsigned int col_back; /* Default background colour. */ + unsigned int col_text; /* Default text colour. */ + unsigned int col_link; /* Default link colour. */ + unsigned int col_used; /* Default used link colour. */ + unsigned int col_foll; /* Default following link colour. */ + unsigned int col_sele; /* Default selected (highlighted) link colour. */ + /* */ + int fontsize; /* Default font size, 16ths of a point. */ + /* */ + int leftmargin; /* Left hand basic page margin, millipoints. */ + int rightmargin; /* Right hand basic page margin, millipoints. */ + int quotemargin; /* Extra page margin for blockquote chunks, millipoints. */ + int leading; /* Line spacing, OS units. */ + int leftindent; /* Multiplier on list etc. indents, millipoints. */ + int minfrmheight; /* Minimum frame height, in OS units. */ + int minfrmwidth; /* Minimum frame width, in OS units. */ + /* */ + int refotime; /* Time to queue up reformats, in centiseconds, if 'refowait' is set. */ + /* */ + int maxghistory; /* Maximum size of global history, in K. */ + int maxvhistory; /* Maximum size of view history, in entries. */ + unsigned char maximages; /* Maximum number of images to fetch simultaneously. */ + /* */ + unsigned systemfont :1; /* 1: Use system font for everything, 0: use outline fonts. */ + unsigned delayimages :1; /* 1: Delay image loading, 0: Load them immediately. */ + unsigned displaybgs :1; /* 1: Display background images, 0: don't. */ + unsigned underlinelks :1; /* 1: Underline link text, 0: don't. */ + unsigned overridecols :1; /* 1: Ignore document specified colours (use defaults), 0: use doc's. */ + unsigned fixedptr :1; /* 1: Pointer must not change shape over page, 1: it can change. */ + unsigned highlightlks :1; /* 1: Objects are highlighted as the pointer moves over them. */ + unsigned keyboardctl :1; /* 1: Keyboard control of link selection enabled, else disabled. */ + unsigned clearfirst :1; /* 1: If popping up URL writable with key, clear first; else append. */ + unsigned keephighlight :1; /* 1: Frames will keep (re)highlighting as keyboard navigated. */ + /* */ + unsigned refowait :1; /* 1: Reformat requests are queued for 'refotime' centiseconds. */ + unsigned refohang :1; /* 1: Reformatter will wait to know image sizes before continuing. */ + unsigned brickwall :1; /* 1: Following links halts other fetches on page else they continue. */ + /* */ + unsigned url_bar :1; /* Attach a URL bar to a window upon creation (1 = yes, 0 = no). */ + unsigned button_bar :1; /* Attach a button bar to a window upon creation (1 = yes, 0 = no). */ + unsigned status_bar :1; /* Attach a status bar to a window upon creation (1 = yes, 0 = no). */ + unsigned show_urls :1; /* 0 - show titles in History menu, else always show URLs. */ + unsigned save_history :1; /* 0 - don't save global history on exit, else always save it. */ + unsigned save_hotlist :1; /* 0 - don't save hotlist on exit (losing any changes), else save it. */ + /* */ + unsigned move_gadgets :2; /* 0 - don't move, 1 - move after resize, 2 = move during resize. */ + unsigned anim_drift :1; /* 0 - stop animation as soon as idle, 1 = drift over to 1st frame. */ + unsigned solid_resize :2; /* Frame resizes; 0 - dashed, 2 - solid, 1 - check CMOS resize bit. */ + /* */ + unsigned full_screen :1; /* 0 - don't start up Full Screen, else 1. */ + unsigned h_scroll :2; /* 0 - no hscroll in Full Screen, 1 - auto add/remove, 2 - always. */ + unsigned v_scroll :2; /* 0 - no vscroll in Full Screen, 1 - auto add/remove, 2 - always. */ + /* */ + unsigned use_proxy :1; /* 0 - don't use a proxy, 1 = use one at URL in Messages file entry. */ } global_choices; diff --git a/h/Handlers b/h/Handlers index 89fc065e3f5db47c4a77f032615df39023deea66..c96530f68dd2cb88b948f5bd28f845d54df7d3fb 100644 --- a/h/Handlers +++ b/h/Handlers @@ -14,10 +14,13 @@ */ /***************************************************/ /* File : Handlers.h */ +/* */ /* Purpose: Event handlers for driving the browser */ /* front-end. */ +/* */ /* Author : A.D.Hodgkinson */ -/* History: 07-Feb-97: Created from Main.h source */ +/* */ +/* History: 07-Feb-97: Created from Main.h. */ /***************************************************/ /* Function prototypes */ @@ -32,6 +35,7 @@ int handle_menus (int eventcode, WimpPollBlock * block, IdBlock * id int handle_scroll_requests (int eventcode, WimpPollBlock * b, IdBlock * idb, browser_data * handle); int handle_clicks (int eventcode, WimpPollBlock * b, IdBlock * idb, browser_data * handle); int handle_link_clicks (int eventcode, WimpPollBlock * b, IdBlock * idb, browser_data * handle); +int handle_drags (int eventcode, WimpPollBlock * b, IdBlock * idb, browser_data * handle); int handle_close_browser (int eventcode, WimpPollBlock * b, IdBlock * idb, browser_data * handle); diff --git a/h/History b/h/History index 94a36b0f1d7a8d73334f5f29515d8f47b1c53f22..1a74ffe2c1a29cdfbc942f7d05eb3c8646aa6901 100644 --- a/h/History +++ b/h/History @@ -12,13 +12,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/*************************************************/ -/* File : History.h */ -/* Purpose: Handles local and global histories */ -/* for the browser. */ -/* Author : A.D.Hodgkinson */ -/* History: 07-Feb-97: Created */ -/*************************************************/ +/***************************************************/ +/* File : History.h */ +/* */ +/* Purpose: Handles local and global histories for */ +/* the browser. */ +/* */ +/* Author : A.D.Hodgkinson */ +/* */ +/* History: 07-Feb-97: Created. */ +/***************************************************/ /* Function prototypes */ diff --git a/h/Images b/h/Images index fa99826450228c8da7c1b505518be9862581e267..8dc501e7b18582e61e524fd3a94656fe70abc1cf 100644 --- a/h/Images +++ b/h/Images @@ -14,12 +14,15 @@ */ /***************************************************/ /* File : Images.h */ -/* Purpose: Image related functions */ +/* */ +/* Purpose: Image related functions. */ +/* */ /* Author : Merlyn Kline for Customer browser */ /* This source adapted by A.D.Hodgkinson */ +/* */ /* History: 28-Nov-96: Created with dummy function */ /* for temporary use in other */ -/* routines */ +/* routines. */ /* 20-Jan-97: Filled in with most of the */ /* functions present and */ /* converted to the new data */ diff --git a/h/JavaScript b/h/JavaScript index 614c194f37e831c660e6c5d37370789436608320..21bffaf2d4f4ea61fbe19e3a2f93ff9f1ecdc2f5 100644 --- a/h/JavaScript +++ b/h/JavaScript @@ -14,11 +14,16 @@ */ /***************************************************/ /* File : JavaScript.h */ -/* Purpose: JavaScript support */ +/* */ +/* Purpose: JavaScript support. */ +/* */ /* Author : A.D.Hodgkinson */ -/* History: 24-Jul-97: Created */ +/* */ +/* History: 24-Jul-97: Created. */ /***************************************************/ +/* Function prototypes */ + _kernel_oserror * javascript_body_onload (browser_data * b); _kernel_oserror * javascript_href_onclick (browser_data * b, HStream * t, int * ignore); diff --git a/h/Limits b/h/Limits index 1fc302619508d95c1c0f1f4353f28007840fd846..071d6501b43bae37fe8e4574c7f823c995a725d5 100644 --- a/h/Limits +++ b/h/Limits @@ -12,49 +12,144 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/*************************************************/ -/* File : Limits.h */ -/* Purpose: Definitions relating to fundamental */ -/* compile-time limitations of the app. */ -/* Author : A.D.Hodgkinson */ -/* History: 13-Nov-96: Created */ -/*************************************************/ - -/* Footnote - where these define maximum string lengths; that */ -/* length does not include the zero terminator, unless stated */ -/* otherwise. */ - -#define MaxLstLen 32 /* Maximum length of a token in the Messages file */ -#define MaxMsgLen 480 /* Maximum length of the text returned by a */ - /* MessageTrans lookup in the Messages file */ - -#define MaxPrgLen 40 /* Maximum length of the app's name for flex library */ - -#define MaxUrlLen 999 /* Maximum length of entries in the URL bar writable */ - /* or Open URL dialogue box writable */ -#define MaxDiaLen 16 /* Maximum length of dialler status display */ -#define MaxStaLen 999 /* Maximum length of status bar status display */ -#define MaxBytLen 20 /* Maximum length of status bar bytes display */ -#define UrlLabLen 16 /* Maximum length of URL writable label */ -#define DiaLabLen 16 /* Maximum length of dialler status label */ -#define StaLabLen 16 /* Maximum length of status display label */ -#define BytLabLen 16 /* Maximum length of byte counter label */ - -#define MaxHelpLen 256 /* Maximum length of a help text message for gadgets */ - /* where this text must be dynamically altered */ - -#define MaxTiBLen 999 /* Maximum length of title bar string */ - -#define MaxHstLen 256 /* History file default save pathname max length */ -#define MaxHotLen 256 /* As MaxHstLen but for the hotlist */ -#define MaxPoILen 256 /* As MaxHstLen but for the post-in pathname */ -#define MaxPoOLen 256 /* As MaxPoILen but for post-out */ - -#define FontNameLen 64 /* Typeface name maximum length in FontManage.c */ -#define TypeNameLen 20 /* RISC OS font name maximum length in FontManage.c */ - -#define MaxAuthDisp 256 /* Max length of display panel in authorisation dbox */ -#define MaxAuthUser 256 /* Max length of user name in authorisation dbox */ -#define MaxAuthPass 256 /* Max length of password in authorisation dbox */ - -#define MaxFindLen 128 /* Max length of entires in the Find dialogue box */ +/***************************************************/ +/* File : Limits.h */ +/* */ +/* */ +/* Purpose: Definitions relating to fundamental */ +/* limitations of the application. */ +/* */ +/* Author : A.D.Hodgkinson */ +/* */ +/* History: 13-Nov-96: Created. */ +/* 16-Aug-97: Ensured that the lengths */ +/* *did* include terminators */ +/* (previously, they weren't */ +/* supposed to). */ +/***************************************************/ + +/***************************************************************************************/ +/* */ +/* Hard coded application limits */ +/* ============================= */ +/* */ +/* Many of these are hard coded limits required since C won't let you do things like: */ +/* */ +/* { */ +/* char buffer[strlen(struct->path) + extralen]; */ +/* */ +/* ... */ +/* } */ +/* */ +/* Others are OS limits, or derived from OS limits; they may be related to the scope */ +/* of values in related HTML; and so-on. */ +/* */ +/* In the lists below, a description of what the limit represents is given. Where */ +/* these are used can be worked out by loading all source / header files and doing a */ +/* global List Of Found. The description is followed by a single digit code: */ +/* */ +/* D The size is arbitrary, though changing the value may have unpredictable effects */ +/* and so every case must be considered in light of the code relevant to the limit */ +/* in question. For example, no errors will be raised if the number of items */ +/* allowed in a <SELECT> list is reduced to 64 - menus would simply be truncated. */ +/* */ +/* The next three are generally relevant to string buffers: */ +/* */ +/* S The buffer is 'safe', i.e. it can be reduced in size and should not be overrun */ +/* if something too big to fit in it is generated. Errors may be raised in this */ +/* case though (e.g. Buffer Too Short complaints from the Toolbox). Correct */ +/* behaviour is not guaranteed at sizes of 2 bytes or less. */ +/* */ +/* U The buffer is 'unsafe', i.e. code assumes that whatever is to fit in the buffer */ +/* will always do so. The sizes defined here must thus be chosen with careful */ +/* consideration of the code involved. Some of these may have guards on them for */ +/* TRACE builds, though. */ +/* */ +/* P Some buffers may be unsafe to an extent in one place but safe elsewhere, in */ +/* which case they generally have to be treated as unsafe. It may be possible to */ +/* modify code at some future time and make all usages safe though, so the */ +/* distinction is made. */ +/* */ +/* Where buffers are related to string lengths, any relevant terminators are included */ +/* in the length. */ +/* */ +/***************************************************************************************/ + +/* First, Messages file related limits. */ + +#define Limits_Token 32 /* Length of any given Messages file token S */ +#define Limits_Message 256 /* Length of any given Messages file message S */ +#define Limits_TaskName 64 /* Length of the _TaskName message (U) - used P */ + /* also for enumerating task names from the */ + /* Task Manager and for the flex library (S) */ +#define Limits_StatusFormat 50 /* Length of the Page, Fetch, Process, Format, S */ + /* and LinkTo messages */ + +/* Resource (Res) file determined limits (Res files must be kept in */ +/* sync with these - that is, any Res file buffer which has an entry */ +/* here should be exactly the size that the entry defines). */ + +#define Limits_Help 256 /* Maximum length of help text for any gadget S */ + +#define Limits_Title 999 /* Browser window title bar S */ +#define Limits_DisplayURL 999 /* URL bar or Open URL dialogue writable S */ +#define Limits_DisplayStats 999 /* Main status display field S */ +#define Limits_DisplayBytes 20 /* Status byte counter display field U */ +#define Limits_DiallerStatus 16 /* Online time and dialler status messages S */ +#define Limits_DiallerLabel 16 /* Label on the dialler status display S */ +#define Limits_StatusLabel 16 /* Label on the main status display S */ +#define Limits_ToolActionIdent 256 /* ToolAction ident strings in the Toolbar S */ + +#define Limits_NRangeIcons 10 /* For get_icon_list on a Number Range gadget U */ +#define Limits_EndManyLabel 64 /* EndManyLabel button text in Print dialogue S */ + +#define Limits_AuthPrompt 256 /* Authorisation dialogue main display panel S */ +#define Limits_AuthUserWrit 256 /* Authorisation dialogue user name writable S */ +#define Limits_AuthPassWrit 256 /* Authorisation dialogue password writable S */ + +#define Limits_FindWrit 128 /* Find dialogue main writable field S */ + +/* OS defined limits (these may not necessarily be actual OS limits, */ +/* but OS related limits which the browser has to enforce internally). */ + +#define Limits_OS_SpriteName 13 /* Sprite name (plus terminator) U */ +#define Limits_OS_FontHandles 256 /* Maximum number of active font handles D */ +#define Limits_OS_Pathname 8192 /* Maximum length of any given pathname, e.g. P */ + /* the Choices file (U) or save dialogue */ + /* pathnames (S). */ + +/* Source file or function local limits for any build... */ + +#define Limits_URL 6144 /* Length of a URL (or URI) string S */ + +#define Limits_UserAgent 256 /* User agent string S */ + +#define Limits_FetchProgress 32 /* Fetch progress, if appending to status U */ + +#define Limits_NamedAnchor 256 /* The string after a '#' in a URL S */ +#define Limits_Target 256 /* Window target name S */ + +#define Limits_FontName 128 /* The length of a RISC OS font name S */ +#define Limits_FaceName 64 /* The length of a browser typeface name S */ +#define Limits_FontSizes 7 /* The 7 font sizes for <FONT SIZE=...> D */ + +#define Limits_SelectItems 1024 /* Number of items in a <SELECT> list D */ + +#define Limits_Realm 192 /* The realm for authorisation S */ +#define Limits_HostName 192 /* The host name for authorisation S */ + + +/* ...and a few more for multiuser builds (SINGLE_USER not defined). */ + +#define Limits_Multi_UserName 20 /* User name for login S */ +#define Limits_Multi_Password 11 /* Password for login S */ +#define Limits_Multi_HomePage 256 /* Home page URL for user S */ +#define Limits_Multi_Name 32 /* User's actual name S */ +#define Limits_Multi_History 256 /* Pathname to save/load history file S */ +#define Limits_Multi_Hotlist 256 /* Pathname to save/load hotlist file S */ + +/* Miscellaneous limits - limitation definitions that don't */ +/* easily fit into another category. */ + +#define Limits_Misc_AnimFrames 1024 /* The number of animation sprites allowed D */ +#define Limits_Misc_Bullets 128 /* The number of bullet sprites allowed D */ diff --git a/h/Main b/h/Main index b367ee04b2183ff7a35e563098c5c0d1b7a6aae9..297cd7774a241cd0f2f4221606c0029ff29f9284 100644 --- a/h/Main +++ b/h/Main @@ -14,10 +14,12 @@ */ /***************************************************/ /* File : Main.h */ -/* Purpose: Toolbox application framework for */ -/* the browser */ +/* */ +/* Purpose: To run. */ +/* */ /* Author : A.D.Hodgkinson */ -/* History: 12-Nov-96: Created */ +/* */ +/* History: 12-Nov-96: Created. */ /***************************************************/ /* General task definitions */ diff --git a/h/Memory b/h/Memory index 61442e2620fa4a07901fa94b5d0b35fcc877df3b..9e55dd1c6c4bc5649eba9933c513ca0235067b69 100644 --- a/h/Memory +++ b/h/Memory @@ -12,15 +12,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/*************************************************/ -/* File : Memory.h */ -/* Purpose: Granularity-controlled memory */ -/* handling functions for the browser, */ -/* designed as transparent replacements */ -/* for malloc, calloc, realloc and free */ -/* Author : A.D.Hodgkinson */ -/* History: 29-Nov-96: Created */ -/*************************************************/ +/***************************************************/ +/* File : Memory.h */ +/* */ +/* Purpose: Granularity-controlled memory handling */ +/* functions for the browser, designed as */ +/* transparent replacements for malloc, */ +/* calloc, realloc and free. */ +/* */ +/* Author : A.D.Hodgkinson */ +/* */ +/* History: 29-Nov-96: Created. */ +/***************************************************/ /* Chunk IDs for set_chunk_size functions; see the */ /* comments above memory_set_chunk_size in Memory.c */ diff --git a/h/Menus b/h/Menus index ad697dea7976d7f60c7369cac069cf511a60301b..64e1465e8e23ea0c42c4961c5da99dd5d0ef514d 100644 --- a/h/Menus +++ b/h/Menus @@ -14,9 +14,12 @@ */ /***************************************************/ /* File : Menus.h */ -/* Purpose: Menu-related functions for the browser */ +/* */ +/* Purpose: Handle browser menus. */ +/* */ /* Author : A.D.Hodgkinson */ -/* History: 20-Nov-96: Created */ +/* */ +/* History: 20-Nov-96: Created. */ /***************************************************/ /* Function prototypes */ diff --git a/h/Meta b/h/Meta index b09862719813d0dff429e8da85cdb462296da484..c54e2a7aa7206886b25867b6c84f9a594465701a 100644 --- a/h/Meta +++ b/h/Meta @@ -14,9 +14,12 @@ */ /***************************************************/ /* File : Meta.h */ -/* Purpose: Handling META tags */ +/* */ +/* Purpose: Handling META tags. */ +/* */ /* Author : A.D.Hodgkinson */ -/* History: 25-Jul-97: Created */ +/* */ +/* History: 25-Jul-97: Created. */ /***************************************************/ _kernel_oserror * meta_process_tag (browser_data * b, HStream * t); diff --git a/h/MiscDefs b/h/MiscDefs index 6928adfa529ba3068ec98bdbe218060b22068ccf..9cd2f1a2a3703c7f2fbb7274b5db2bf3c6ba5fb3 100644 --- a/h/MiscDefs +++ b/h/MiscDefs @@ -14,10 +14,13 @@ */ /***************************************************/ /* File : MiscDefs.h */ +/* */ /* Purpose: Miscellaneous definitions for the */ /* browser. */ +/* */ /* Author : A.D.Hodgkinson */ -/* History: 13-Feb-97: Created */ +/* */ +/* History: 13-Feb-97: Created. */ /***************************************************/ /* Browser-defined bits in the flags field of an HStream structure */ diff --git a/h/Mouse b/h/Mouse index d2716209de5407e23131fe89660813548acae541..90871bd9ddf7e7423a01ac4382694b0c8defc9ef 100644 --- a/h/Mouse +++ b/h/Mouse @@ -14,18 +14,25 @@ */ /***************************************************/ /* File : Mouse.h */ +/* */ /* Purpose: Mouse pointer related functions for */ -/* the browser */ +/* the browser. */ +/* */ /* Author : A.D.Hodgkinson */ -/* History: 14-Mar-97: Created */ +/* */ +/* History: 14-Mar-97: Created. */ /***************************************************/ /* Shape definitions */ -#define Mouse_Shape_Off 0 -#define Mouse_Shape_Normal 1 -#define Mouse_Shape_Link 2 -#define Mouse_Shape_Map 3 +#define Mouse_Shape_Off 0 +#define Mouse_Shape_Normal 1 +#define Mouse_Shape_Link 2 +#define Mouse_Shape_Map 3 +#define Mouse_Shape_UD 4 +#define Mouse_Shape_LR 5 +#define Mouse_Shape_UDLR 6 +#define Mouse_Shape_NoResize 7 /* Function prototypes */ diff --git a/h/Multiuser b/h/Multiuser index 1a8e306467377afd6577614a0b1194a08b5b237e..2c98b1c53e6bcf67a4f8f60d05d30f6a6e6d6b73 100644 --- a/h/Multiuser +++ b/h/Multiuser @@ -12,26 +12,29 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/*************************************************/ -/* File : Multiuser.h */ -/* Purpose: Definitions required by multi-user */ -/* builds. Included by Global.h if */ -/* SINGLE_USER is not defined. */ -/* Author : A.D.Hodgkinson */ -/* History: 23-Jul-97: Created */ -/*************************************************/ +/***************************************************/ +/* File : Multiuser.h */ +/* */ +/* Purpose: Definitions required by multi-user */ +/* builds. Included by Global.h if */ +/* SINGLE_USER is not defined. */ +/* */ +/* Author : A.D.Hodgkinson */ +/* */ +/* History: 23-Jul-97: Created. */ +/***************************************************/ + +/* Structures */ typedef struct userdef { - char homepage [256]; - char name [32]; - - char lastfind [64]; - int casematch; - - char historyfile [256]; - char hotlistfile [256]; + char homepage [Limits_Multi_HomePage]; + char name [Limits_Multi_Name]; + char historyfile [Limits_Multi_History]; + char hotlistfile [Limits_Multi_Hotlist]; } userdef; +/* Globals */ + extern userdef user; diff --git a/h/NestWimp b/h/NestWimp index 3718db1f00e72ec7948d99d7073b7c4649364d16..0f75efe6dbd9055568c1ab88179245e389866eab 100644 --- a/h/NestWimp +++ b/h/NestWimp @@ -12,13 +12,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/*************************************************/ -/* File : NestWimp.h */ -/* Purpose: Definitions to use the new features */ -/* of the nested Wimp. */ -/* Author : A.D.Hodgkinson */ -/* History: 21-Feb-97: Created */ -/*************************************************/ +/***************************************************/ +/* File : NestWimp.h */ +/* */ +/* Purpose: Definitions to use the new features of */ +/* the nested Wimp. */ +/* */ +/* Author : A.D.Hodgkinson */ +/* */ +/* History: 21-Feb-97: Created. */ +/***************************************************/ /* Extensions to Wimp_OpenWindow */ diff --git a/h/Printing b/h/Printing index 143f65f78488b2cac3527ac5465c5a2758ad40f2..fb4864e93d0ddfd4c8e8328048aa60b56814104b 100644 --- a/h/Printing +++ b/h/Printing @@ -14,9 +14,12 @@ */ /***************************************************/ /* File : Printing.h */ -/* Purpose: Printing functions for the browser */ +/* */ +/* Purpose: Printing functions for the browser. */ +/* */ /* Author : A.D.Hodgkinson */ -/* History: 27-Jan-97: Created */ +/* */ +/* History: 27-Jan-97: Created. */ /***************************************************/ /* Message definitions */ diff --git a/h/Redraw b/h/Redraw index daa88bf31f965c4d48ba110ac4a9aa0d4ead0bc6..76371f66e3e739c26fdd7db865e00e82ccd73a01 100644 --- a/h/Redraw +++ b/h/Redraw @@ -14,9 +14,12 @@ */ /***************************************************/ /* File : Redraw.h */ -/* Purpose: Redraw functions for the browser */ +/* */ +/* Purpose: Redraw functions for the browser. */ +/* */ /* Author : A.D.Hodgkinson */ -/* History: 29-Nov-96: Created */ +/* */ +/* History: 29-Nov-96: Created. */ /***************************************************/ /* Definitions */ diff --git a/h/Reformat b/h/Reformat index 8e29edec2d279f67d58e5e3c232ba79f5487320c..1d74496007cd4388c6c42f3793d96a272ce077da 100644 --- a/h/Reformat +++ b/h/Reformat @@ -14,9 +14,22 @@ */ /***************************************************/ /* File : Reformat.h */ -/* Purpose: Reformatting functions for the browser */ +/* */ +/* Purpose: Functions to handle page reformatting. */ +/* */ /* Author : A.D.Hodgkinson */ -/* History: 03-Dec-96: Created */ +/* */ +/* History: 03-Dec-96: Created. */ +/* 16-Apr-97: First merge with T.Cheal's */ +/* table code... */ +/* 22-May-97: Amazingly, *still* trying */ +/* to get this to work. */ +/* 18-Jun-97: Hpmh; works, but very slow. */ +/* Will need to rewrite at */ +/* some stage; for the moment, */ +/* moved a few bits over to */ +/* Tables.c as they fitted in */ +/* better over there. */ /***************************************************/ #include "HTMLLib.h" /* From the HTML library; the definitions below rely on this */ diff --git a/h/Save b/h/Save index b0f19bc99f91af5c553cac32a5e149aa813ecf15..8546b7c326752ad5f317aaefadeb90b77dfe3c14 100644 --- a/h/Save +++ b/h/Save @@ -14,25 +14,36 @@ */ /***************************************************/ /* File : Save.h */ -/* Purpose: Save functions for the browser */ +/* */ +/* Purpose: Save functions for the browser. */ +/* */ /* Author : A.D.Hodgkinson */ -/* History: 04-Dec-96: Created */ +/* */ +/* History: 04-Dec-96: Created. */ /***************************************************/ /* Filetype definitions */ -#define FileType_HTML 0xFAF #define FileType_TEXT 0xFFF +#define FileType_DATA 0xFFD #define FileType_POUT 0xFF4 +#define FileType_TIFF 0xFF0 +#define FileType_HTML 0xFAF #define FileType_URI 0xF91 +#define FileType_JPEG 0xC85 +#define FileType_PNG 0xB60 +#define FileType_URL 0xB28 +#define FileType_GIF 0x695 /* Function prototypes */ -ObjectId save_return_dialogue_id (void); +ObjectId save_return_dialogue_id (void); -int save_fill_in (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle); -int save_fill_for_html (IdBlock * idb); +int save_fill_in (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle); +int save_fill_for_html (IdBlock * idb); +_kernel_oserror * save_fill_for_object (browser_data * b, char * url); -int save_save_to_file (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle); -int save_fill_buffer (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle); -int save_save_completed (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle); +int save_save_to_file (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle); +int save_fill_buffer (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle); +int save_save_completed (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle); +int save_dialogue_completed (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle); diff --git a/h/Tables b/h/Tables index 37eb5e03662d686ca78cba8b26e27d6a37ffbf90..6869102c8c5ee82a2cefd33967e0cbfb02f57ccd 100644 --- a/h/Tables +++ b/h/Tables @@ -13,9 +13,12 @@ * limitations under the License. */ /***************************************************/ -/* File : tablelib.c */ -/* Purpose: Table handling functions */ +/* File : Tables.h */ +/* */ +/* Purpose: Table handling functions. */ +/* */ /* Author : T.Cheal, adapted by A.D.Hodgkinson */ +/* */ /* History: 18-Mar-97: Datestamp on code received */ /* from T.Cheal. */ /* 17-Apr-97: Split up; HTMLLib specific */ diff --git a/h/TokenUtils b/h/TokenUtils index 97081b6681d6102b21f8ccaedbc333fe1adf972b..dfbc859709414ba8b214d50252f4dbefa59de850 100644 --- a/h/TokenUtils +++ b/h/TokenUtils @@ -12,13 +12,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/*************************************************/ -/* File : TokenUtils.h */ -/* Purpose: Utility functions for finding */ -/* out information about tokens. */ -/* Author : A.D.Hodgkinson */ -/* History: 09-Apr-97: Created */ -/*************************************************/ +/***************************************************/ +/* File : TokenUtils.h */ +/* */ +/* Purpose: Utility functions for finding out */ +/* information about tokens. */ +/* */ +/* Author : A.D.Hodgkinson */ +/* */ +/* History: 09-Apr-97: Created. */ +/***************************************************/ /* Structures */ diff --git a/h/ToolAction b/h/ToolAction index 0e6f717dd71df65089ddffb7181a373160bebd1d..fb27777d09bea6a82de9cb4284a97f717915060a 100644 --- a/h/ToolAction +++ b/h/ToolAction @@ -14,10 +14,13 @@ */ /***************************************************/ /* File : ToolAction.h */ +/* */ /* Purpose: Definitions that don't use OSLib... */ +/* */ /* Author : Copied from header by S.Middleton, by */ -/* A.D.Hodgkinson. */ -/* History: 26-Feb-97: Created */ +/* A.D.Hodgkinson */ +/* */ +/* History: 26-Feb-97: Created. */ /***************************************************/ /********************************** diff --git a/h/Toolbars b/h/Toolbars index 8e7095596e51a6c3fe9f2ad0cf46fd893287fae3..10c0369f743d044c055e95f5cc210122b7e2a6f1 100644 --- a/h/Toolbars +++ b/h/Toolbars @@ -14,10 +14,13 @@ */ /***************************************************/ /* File : Toolbars.h */ +/* */ /* Purpose: Toolbar-related functions for the */ -/* browser */ +/* browser. */ +/* */ /* Author : A.D.Hodgkinson */ -/* History: 21-Nov-96: Created */ +/* */ +/* History: 21-Nov-96: Created. */ /***************************************************/ /* Magic number definitions */ diff --git a/h/Trace b/h/Trace index 6fd80e3d1fe000c38c4a5bc1e2079848cde1485e..160f580f50888aad341414ea9dd61e7851beb047 100644 --- a/h/Trace +++ b/h/Trace @@ -14,14 +14,17 @@ */ /***************************************************/ /* File : Trace.c */ +/* */ /* Purpose: Trace build only debugging functions */ /* - not the sort of thing that hacks */ /* up some text display or whatever; that */ /* is the domain of TML. These functions */ /* are for principally file-based output */ /* of things like token list dumps. */ +/* */ /* Author : A.D.Hodgkinson */ -/* History: 02-Jul-97: Created */ +/* */ +/* History: 02-Jul-97: Created. */ /***************************************************/ int trace_dump_tokens_by_line (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle); diff --git a/h/URLutils b/h/URLutils index 31090f5f03c6a503a998db9882d6c0072d46c4e9..91313c6040cd0d8a57131a7e5b8b0f0143487c1f 100644 --- a/h/URLutils +++ b/h/URLutils @@ -14,16 +14,23 @@ */ /***************************************************/ /* File : URLutils.h */ +/* */ /* Purpose: URL manipulation for the browser. */ +/* */ /* Author : Merlyn Kline for Customer browser */ /* This source adapted by A.D.Hodgkinson */ -/* from various original functions, with */ -/* new additions. */ -/* History: 06-Feb-97: Created */ +/* from various original functions */ +/* */ +/* History: 06-Feb-97: Created. */ /***************************************************/ #include "URI.h" /* URI handler API, in URILib:h */ +/* General definitions */ + +#define Internal_URL "!INTRNL!" /* Special string (i.e. hack...) to mark a URL as internal only. */ +#define Int_URL_Len 8 /* Saves having to strlen(Internal_URL) in various places. */ + /* Structures */ /* If using the URI handler, need to keep an array of all */ diff --git a/h/Utils b/h/Utils index 578ffd955330a58f996b682f4f546d60e1667692..ebb1780cb144f75bc942c8a1a2295b15d7b5a787 100644 --- a/h/Utils +++ b/h/Utils @@ -12,12 +12,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/*************************************************/ -/* File : Utils.h */ -/* Purpose: Infrequently altered utilities */ -/* Author : A.D.Hodgkinson */ -/* History: 18-Oct-96: Created */ -/*************************************************/ +/***************************************************/ +/* File : Utils.h */ +/* */ +/* Purpose: Infrequently altered utilities. */ +/* */ +/* Author : A.D.Hodgkinson */ +/* */ +/* History: 18-Oct-96: Created. */ +/***************************************************/ /* Useful macros */ @@ -41,7 +44,7 @@ #define Utils_Error_Custom_Fatal ((1u<<30) + 1) /* Offers only 'Quit' */ #define Utils_Error_Custom_Message ((1u<<30) + 2) /* Offers only 'Continue' */ -/* Miscellaneous function prototypes */ +/* Function prototypes */ char * lookup_token (char * s, int flag, char * arg); char * lookup_choice (char * s, int flag, char * arg); @@ -102,6 +105,7 @@ browser_data * utils_ancestor (browser_data * b); int encode_base64 (const char * in, int len, char * out); int utils_strcasecmp (const char * a, const char * b); int utils_strncasecmp (const char * a, const char * b, unsigned int n); +int utils_len_printf (const char * format, ...); _kernel_oserror * utils_stop_webserv (void); _kernel_oserror * utils_set_http_agent (void); diff --git a/h/Windows b/h/Windows index 4a854671caf13cd71937f7ed9d55e504bf7ffba1..aa70f4d9ca860b118814f6cb65902f02d12ab36b 100644 --- a/h/Windows +++ b/h/Windows @@ -13,14 +13,16 @@ * limitations under the License. */ /***************************************************/ +/* File : Utils.h */ /* File : Windows.h */ +/* */ /* Purpose: Window related functions for the */ /* browser (open, close, create, etc.). */ +/* */ /* Author : A.D.Hodgkinson */ -/* History: 20-Nov-96: Created */ -/* 15-Mar-97: Browser.c created from all */ -/* browser_ prefixed functions */ -/* to reduce source file size */ +/* */ +/* History: 20-Nov-96: Created. */ +/* 15-Mar-97: Split up to form Browser.h. */ /***************************************************/ /* Magic number definitions */ @@ -33,7 +35,7 @@ /* Function prototypes */ int windows_new_browser (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle); -_kernel_oserror * windows_create_browser (char * url, browser_data * parent, BBox * size, char * name); +_kernel_oserror * windows_create_browser (char * url, browser_data * parent, BBox * size, char * name, int savelink); int windows_open_browser (int eventcode, WimpPollBlock * b, IdBlock * idb, browser_data * handle); int windows_remember_size (int eventcode, WimpPollBlock * b, IdBlock * idb, void * handle);