Commit 595f27a2 authored by Andrew Hodgkinson's avatar Andrew Hodgkinson
Browse files

Odd problem with Entries file meant none got checked in last time...

parent c46c55b2
......@@ -14,8 +14,12 @@
*/
/***************************************************/
/* File : Authorise.h */
/* */
/* Purpose: Browser remote authorisation services. */
/* (aka. authentication). */
/* */
/* Author : A.D.Hodgkinson */
/* */
/* History: 24-Apr-97: Created. */
/***************************************************/
......
......@@ -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;
......
......@@ -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 */
......
......@@ -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);
......@@ -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);
......@@ -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 */
......
......@@ -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;
......
......@@ -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 */
......
......@@ -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);
......
......@@ -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 */
......
This diff is collapsed.
......@@ -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);
......
......@@ -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 */
......
......@@ -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 */
......
......@@ -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);
......
......@@ -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 */
......@@ -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 */
......
......@@ -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 */
......
......@@ -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 */
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment