//

// Global data types and variables

//


#include <windows.h>

#include <time.h>


#ifndef FD_SETSIZE

#include <Winsock2.h>       // Winsock header, used mainly by Winsock object

#endif

#include "options.h"        // Used for dialog boxes

#include "linkedlist.h"     // Linked list template, used for all oinked lists in program

#include "listtypes.h"      // Linked list object types, using the list template

#include "config.h"         // Config object to maintain users settings

#include "fileaccess.h"     // Fileaccess object to handle all reads and writes to files

#include "registry.h"


// ***************** Global Constants *****************


#define GLOBAL_DECL         true

#define SERVER_ADDR         "http://www.co.umist.ac.uk/~mcai7ah2/pagelist.txt"

#define LIMIT_DOMAIN        true

#define COMPILER_V6         0

#define EZ_ATTR_BOLD        1

#define EZ_ATTR_ITALIC      2

#define EZ_ATTR_UNDERLINE   4

#define EZ_ATTR_STRIKEOUT   8

#define HOUR                (datetime -> tm_hour)

#define MIN                 (datetime -> tm_min)

#define SEC                 (datetime -> tm_sec)

#define YEAR                (datetime -> tm_year % 100)

#define MONTH               (datetime -> tm_mon + 1)

#define DAY                 (datetime -> tm_mday)

#define MAXLEN_URL          500

#define MAXLEN_DOMAIN       100

#define MAXLEN_PATH         400

#define MAXLEN_FILENAME     400

#define MAXLEN_LFILENAME    600

#define MAXLEN_ALT          500

#define MAXLEN_ERROR        100

#define MAXLEN_DESCRIPTION  100

#define MAXLEN_FILTER       30


// **************** Global Variables ******************


static HWND hwndMain;       // Main window handle

static HWND hwndStat;       // Status window handle

static HINSTANCE hInst;     // Program instance


// *************** Function prototypes ****************


// Main.cpp

void Test();
void About();
void Instructions();
void OpenBrowser();
HFONT EzCreateFont(HDC, char*, int, int, int, BOOL);

// Subclassed window procedures

LRESULT CALLBACK NewButtonProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK NewCheckProc(HWND, UINT, WPARAM, LPARAM);

// ParseCategories.cpp

pglist* ParseCategories(pglist*, config*);
void get_from_line(char*, char*);
// GetPageFile.cpp

bool Download_Page_File(config*);
// Dialup.cpp

bool DialUp( config* );
void HangUp( config* );
/*void ShutDown( void );*/
void GetOS( config* );
void GetDefDialUp( config*, bool );

// Testing Functions

void url_splitter_Test( void );

#include "statuswindow.h"   // Status window object to show download status


// PageGetter.cpp

void get_all_pages(pglist*, config*, statuswnd*, HWND);

#include "menubuttons.h"    // Object maintaining menu button values

#include "wsock.h"          // WSock object to handle connections to network

#include "getter.h"         // Getter object to handle downloading of pages

#include "parseHTML.h"      // Parser object to parse pages


// ********************* Macros ***********************


#define CreateTitleFont EzCreateFont(hdc, "Arial", 200, 0, EZ_ATTR_BOLD, TRUE)

#define CreateMainFont  EzCreateFont(hdc, "Arial", 120, 0, EZ_ATTR_BOLD, TRUE)


syntax highlighted by Code2HTML, v. 0.8.11