diff --git a/examples/api/api1.c b/examples/api/api1.c index c8180983d1..e8949e159c 100644 --- a/examples/api/api1.c +++ b/examples/api/api1.c @@ -40,9 +40,7 @@ int pr_error (long *, char *); static char *create_tbl = "CREATE TABLE dbinfo (when_created DATE)"; static char *insert_date = "INSERT INTO dbinfo VALUES ('NOW')"; -int main (ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main (int argc, char** argv) { isc_db_handle newdb = NULL; /* database handle */ isc_tr_handle trans = NULL; /* transaction handle */ @@ -125,9 +123,7 @@ ARGLIST(char **argv) * Print the status, the SQLCODE, and exit. * Also, indicate which operation the error occured on. */ -int pr_error (ARG(long *, status), ARG(char *, operation)) -ARGLIST(long * status) -ARGLIST(char * operation) +int pr_error (long* status, char* operation) { printf("[\n"); printf("PROBLEM ON \"%s\".\n", operation); @@ -140,3 +136,4 @@ ARGLIST(char * operation) return 1; } + diff --git a/examples/api/api10.c b/examples/api/api10.c index 5f0b59f17d..ab5f24c388 100644 --- a/examples/api/api10.c +++ b/examples/api/api10.c @@ -38,9 +38,7 @@ char *upd_str = "UPDATE proj_dept_budget SET quart_head_cnt = ? WHERE CURRENT OF S"; -int main (ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main (int argc, char** argv) { long hcnt[4]; ISC_QUAD array_id; @@ -154,7 +152,7 @@ ARGLIST(char **argv) (ISC_ARRAY_DESC *) &desc, (void *) hcnt, (long *) &len)) - {ERREXIT (status, 1)}; + {ERREXIT (status, 1)} dept_no [osqlda->sqlvar[0].sqllen] = '\0'; printf("Department #: %s\n\n", dept_no); @@ -172,7 +170,7 @@ ARGLIST(char **argv) (ISC_ARRAY_DESC *) &desc, (void *) hcnt, (long *) &len)) - {ERREXIT (status, 1)}; + {ERREXIT (status, 1)} /* Update the array handle. */ if (isc_dsql_execute(status, &trans, &ustmt, 1, isqlda)) @@ -210,3 +208,4 @@ ARGLIST(char **argv) return 0; } + diff --git a/examples/api/api11.c b/examples/api/api11.c index 1bc2da77a6..8690da2775 100644 --- a/examples/api/api11.c +++ b/examples/api/api11.c @@ -37,9 +37,7 @@ int select_projects (isc_db_handle db, int emp_no); int add_emp_proj (isc_db_handle db, int emp_no, char * proj_id); int get_params (isc_db_handle db, int * emp_no, char * proj_id); -int main (ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main (int argc, char** argv) { int emp_no; char proj_id[PROJLEN + 2]; @@ -97,9 +95,7 @@ ARGLIST(char **argv) * Select from a stored procedure. * Procedure 'get_emp_proj' gets employee's projects. */ -int select_projects (ARG(isc_db_handle, db), ARG(int, emp_no)) -ARGLIST(void *db) -ARGLIST(int emp_no) +int select_projects (isc_db_handle db, int emp_no) { char proj_id[PROJLEN + 2]; char selstr[BUFLEN]; @@ -171,10 +167,7 @@ ARGLIST(int emp_no) * Execute a stored procedure. * Procedure 'add_emp_proj' adds an employee to a project. */ -int add_emp_proj (ARG(isc_db_handle, db), ARG(int, emp_no), ARG(char *, proj_id)) -ARGLIST(void *db) -ARGLIST(int emp_no) -ARGLIST(char *proj_id) +int add_emp_proj (isc_db_handle db, int emp_no, char *proj_id) { char exec_str[BUFLEN]; isc_tr_handle trans = NULL; @@ -204,12 +197,7 @@ ARGLIST(char *proj_id) /* * Set-up procedure parameters and clean-up old data. */ -int get_params (ARG(void *, db), - ARG(int *, emp_no), - ARG(char *, proj_id)) -ARGLIST(void *db) -ARGLIST(int *emp_no) -ARGLIST(char *proj_id) +int get_params (isc_db_handle db, int *emp_no, char *proj_id) { isc_tr_handle trans = NULL; ISC_STATUS_ARRAY status; @@ -239,3 +227,4 @@ ARGLIST(char *proj_id) return 0; } + diff --git a/examples/api/api12.c b/examples/api/api12.c index e6e359b704..9415782853 100644 --- a/examples/api/api12.c +++ b/examples/api/api12.c @@ -50,7 +50,7 @@ #define BUFLEN 512 -char * more_orders (void); +char* more_orders (void); int do_trans (void); int cleanup (void); @@ -71,9 +71,7 @@ int Inp_ptr = 0; char *trans_str = "SET TRANSACTION ISOLATION LEVEL READ COMMITTED"; -int main (ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main (int argc, char** argv) { char empdb[128]; @@ -375,7 +373,8 @@ int cleanup (void) /* * Return the order number for the next sales order to be entered. */ -char *more_orders (void) +char* more_orders (void) { return Sales[Inp_ptr++]; } + diff --git a/examples/api/api13.c b/examples/api/api13.c index 9a5ad4a065..4c62dbc4aa 100644 --- a/examples/api/api13.c +++ b/examples/api/api13.c @@ -40,9 +40,7 @@ char *sel_str1 = "SELECT currency FROM country WHERE country = 'Canada'"; -int main (ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main (int argc, char** argv) { char *country = "Canada"; /* passed as a parameter */ char *new_name = "CdnDollar"; /* passed as a parameter */ @@ -195,3 +193,4 @@ ARGLIST(char **argv) return 0; } + diff --git a/examples/api/api14.e b/examples/api/api14.e index 3bae1b7786..2f47899dae 100644 --- a/examples/api/api14.e +++ b/examples/api/api14.e @@ -60,9 +60,7 @@ EXEC SQL -int main(ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main(int argc, char** argv) { BASED_ON employee.salary salary; SQL_VARCHAR(5) job_code; diff --git a/examples/api/api15.c b/examples/api/api15.c index a9014a442e..f8915bc72e 100644 --- a/examples/api/api15.c +++ b/examples/api/api15.c @@ -39,9 +39,7 @@ #include "example.h" #include -int main (ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main (int argc, char** argv) { isc_db_handle db = NULL; /* database handle */ isc_tr_handle trans = NULL; /* transaction handle */ @@ -218,3 +216,4 @@ ARGLIST(char **argv) return 0; } + diff --git a/examples/api/api16.c b/examples/api/api16.c index b935fc0b26..3bd81d3d32 100644 --- a/examples/api/api16.c +++ b/examples/api/api16.c @@ -50,10 +50,7 @@ short event_flag = 0; void ast_routine (void *, USHORT, const UCHAR *); -int main(ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) - +int main(int argc, char** argv) { isc_db_handle DB = NULL; /* database handle */ isc_tr_handle trans = NULL; /* transaction handle */ @@ -97,11 +94,11 @@ ARGLIST(char **argv) sqlda->sqlvar[0].sqlind = &nullind; if (isc_attach_database (status, 0, dbname, &DB, 0, NULL)) - {ERREXIT(status, 1)}; + {ERREXIT(status, 1)} /* SET TRANSACTION ISOLATION LEVEL READ COMMITTED */ if (isc_start_transaction (status, &trans, 1, &DB, 5, isc_tpb)) - {ERREXIT(status, 1)}; + {ERREXIT(status, 1)} /* Prepare the query to look at the result tables */ strcpy(query, " SELECT po_number FROM sales \ @@ -133,7 +130,7 @@ ARGLIST(char **argv) */ if(isc_que_events(status, &DB, &event_id, length, event_buffer, ast_routine, result_buffer)) - {ERREXIT(status, 1)}; + {ERREXIT(status, 1)} while (!ret) @@ -172,7 +169,7 @@ ARGLIST(char **argv) /* Select query to look at triggered events */ if (isc_dsql_execute(status, &trans, &stmt, 1, NULL)) - {ERREXIT(status, 1)}; + {ERREXIT(status, 1)} while (!isc_dsql_fetch(status, &stmt, 1, sqlda)) { @@ -186,7 +183,7 @@ ARGLIST(char **argv) /* Update current row */ if(isc_dsql_execute_immediate(status, &DB, &trans, 0, update, 1, NULL)) - {ERREXIT(status, 1)}; + {ERREXIT(status, 1)} } /* Close cursor */ isc_dsql_free_statement(status, &stmt, DSQL_close); @@ -197,7 +194,7 @@ ARGLIST(char **argv) if (isc_que_events(status, &DB, &event_id, length, event_buffer, ast_routine, result_buffer)) - {ERREXIT(status, 1)}; + {ERREXIT(status, 1)} } /* This does not block, but as a sample program there is nothing @@ -220,12 +217,7 @@ ARGLIST(char **argv) ** event will land us here . PLus we get called once when the ** program first starts. */ -void ast_routine(ARG(void *, result), - ARG(USHORT, length), - ARG(const UCHAR *, updated)) -ARGLIST(void *result) -ARGLIST(const UCHAR *updated) -ARGLIST(USHORT length) +void ast_routine(void *result, USHORT length, /*const*/ UCHAR *updated) { /* Set the global event flag */ diff --git a/examples/api/api16t.c b/examples/api/api16t.c index 40e0424c3e..96e1f87ffb 100644 --- a/examples/api/api16t.c +++ b/examples/api/api16t.c @@ -35,9 +35,7 @@ #include -int main (ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main (int argc, char** argv) { struct { short len; @@ -179,3 +177,4 @@ ARGLIST(char **argv) return 0; } + diff --git a/examples/api/api2.c b/examples/api/api2.c index 0c97402048..a13ee95a8c 100644 --- a/examples/api/api2.c +++ b/examples/api/api2.c @@ -45,9 +45,7 @@ isc_tr_handle trans = NULL; /* transaction handle */ ISC_STATUS_ARRAY status; /* status vector */ char Db_name[128]; -int main (ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main (int argc, char** argv) { int n = 0; char exec_str[MAXLEN]; @@ -139,9 +137,7 @@ ARGLIST(char **argv) * Construct an 'insert' statement from the supplied parameters. */ -int getline (ARG(char *, line), ARG(int, line_no)) -ARGLIST(char * line) -ARGLIST(int line_no) +int getline (char* line, int line_no) { static char * Dept_data[] = { @@ -191,3 +187,4 @@ int cleanup (void) return 0; } + diff --git a/examples/api/api3.c b/examples/api/api3.c index 982590ef93..2672eea52c 100644 --- a/examples/api/api3.c +++ b/examples/api/api3.c @@ -41,9 +41,7 @@ /* This macro is used to declare structures representing SQL VARCHAR types */ #define SQL_VARCHAR(len) struct {short vary_length; char vary_string[(len)+1];} -int main (ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main (int argc, char** argv) { SQL_VARCHAR(LASTLEN) last_name; SQL_VARCHAR(FIRSTLEN) first_name; @@ -157,3 +155,4 @@ ARGLIST(char **argv) return 0; } + diff --git a/examples/api/api4.c b/examples/api/api4.c index 58b0992e55..950b565c75 100644 --- a/examples/api/api4.c +++ b/examples/api/api4.c @@ -49,9 +49,7 @@ isc_db_handle DB = NULL; /* database handle */ isc_tr_handle trans = NULL; /* transaction handle */ ISC_STATUS_ARRAY status; /* status vector */ -int main (ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main (int argc, char** argv) { char dept_no[4]; double percent_inc; @@ -152,9 +150,7 @@ ARGLIST(char **argv) * Get the department and percent parameters. */ -int get_input (ARG(char *,dept_no), ARG(double *,percent)) -ARGLIST(char *dept_no) -ARGLIST(double *percent) +int get_input (char *dept_no, double *percent) { if (Dept_data[Input_ptr] == 0) return 0; @@ -166,3 +162,4 @@ ARGLIST(double *percent) return 1; } + diff --git a/examples/api/api5.c b/examples/api/api5.c index e58c92a1bd..ff421dedd9 100644 --- a/examples/api/api5.c +++ b/examples/api/api5.c @@ -41,9 +41,7 @@ isc_tr_handle trans = 0; /* transaction handle */ ISC_STATUS_ARRAY status; /* status vector */ -int main (ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main (int argc, char** argv) { int num_cols, i; isc_stmt_handle stmt = NULL; @@ -140,3 +138,4 @@ ARGLIST(char **argv) return 0; } + diff --git a/examples/api/api6.c b/examples/api/api6.c index 6935b1e7a4..7e21d5e581 100644 --- a/examples/api/api6.c +++ b/examples/api/api6.c @@ -55,9 +55,7 @@ char *tot_str = -int main (ARG(int, argc), ARG(char **,argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main (int argc, char** argv) { char dept_no[DEPTLEN + 2]; char proj_id[PROJLEN + 2]; @@ -251,8 +249,7 @@ ARGLIST(char **argv) /* * Determine a percent increase for the department's budget. */ -float increase_factor (ARG(double, budget)) -ARGLIST(double budget) +float increase_factor (double budget) { if (budget < 100000L) return (float)0.15; @@ -261,3 +258,4 @@ ARGLIST(double budget) else return (float)0.5; } + diff --git a/examples/api/api7.c b/examples/api/api7.c index 4a0c7dfec3..2f766e11a4 100644 --- a/examples/api/api7.c +++ b/examples/api/api7.c @@ -36,9 +36,7 @@ /* This macro is used to declare structures representing SQL VARCHAR types */ #define SQL_VARCHAR(len) struct {short vary_length; char vary_string[(len)+1];} -int main (ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main (int argc, char** argv) { SQL_VARCHAR(PROJLEN + 2) proj_name; char prod_type[TYPELEN + 2]; @@ -181,3 +179,4 @@ ARGLIST(char **argv) return 0; } + diff --git a/examples/api/api8.c b/examples/api/api8.c index bc3bea8b8e..eaaf632eed 100644 --- a/examples/api/api8.c +++ b/examples/api/api8.c @@ -62,9 +62,7 @@ static char *Proj_data[] = int Inp_ptr = 0; -int main (ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main (int argc, char** argv) { char proj_id[PROJLEN + 1]; char upd_stmt[BUFLEN + 1]; @@ -180,3 +178,4 @@ char *get_line (void) { return Proj_data[Inp_ptr++]; } + diff --git a/examples/api/api9.c b/examples/api/api9.c index b455868be6..def3a74b01 100644 --- a/examples/api/api9.c +++ b/examples/api/api9.c @@ -44,9 +44,7 @@ char *sel_str = /* Blob parameter buffer. */ char bpb[] = {1,2,2,-4,-1,1,2,1,0}; -int main (ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main (int argc, char** argv) { char job_code[CODELEN + 2]; short job_grade; @@ -178,3 +176,4 @@ ARGLIST(char **argv) return 0; } + diff --git a/examples/api/api9f.c b/examples/api/api9f.c index a168950a36..60f6cefda6 100644 --- a/examples/api/api9f.c +++ b/examples/api/api9f.c @@ -16,6 +16,7 @@ * All Rights Reserved. * Contributor(s): ______________________________________. */ + #include #include #include "example.h" @@ -63,9 +64,7 @@ extern int fgetc(); static char prevbuf[BUFFER_LENGTH + 1]; static int width = 40; -int EXPORT desc_filter (ARG(SHORT, action), ARG(ISC_BLOB_CTL, control)) -ARGLIST(SHORT action) -ARGLIST(ISC_BLOB_CTL control) +int EXPORT desc_filter (SHORT action, ISC_BLOB_CTL control) { /************************************** * @@ -118,14 +117,8 @@ switch (action) return FB_SUCCESS; } -static int caller (ARG(SHORT, action), ARG(ISC_BLOB_CTL, control), - ARG(SHORT, buffer_length), ARG(CHAR*, buffer), - ARG(SHORT*, return_length)) -ARGLIST(SHORT action) -ARGLIST(ISC_BLOB_CTL control) -ARGLIST(SHORT buffer_length) -ARGLIST(CHAR *buffer) -ARGLIST(SHORT *return_length) +static int caller (SHORT action, ISC_BLOB_CTL control, SHORT buffer_length, + CHAR *buffer, SHORT *return_length) { /************************************** * @@ -156,9 +149,7 @@ return status; } -static int dump_text (ARG(SHORT, action), ARG(ISC_BLOB_CTL, control)) -ARGLIST(SHORT action) -ARGLIST(ISC_BLOB_CTL control) +static int dump_text (SHORT action, ISC_BLOB_CTL control) { /************************************** * @@ -229,9 +220,7 @@ ARGLIST(ISC_BLOB_CTL control) return FB_SUCCESS; } -static void set_statistics (ARG(char*, filename), ARG(ISC_BLOB_CTL, control)) -ARGLIST(char filename) -ARGLIST(ISC_BLOB_CTL control) +static void set_statistics (char* filename, ISC_BLOB_CTL control) { /************************************* * @@ -293,9 +282,7 @@ control->ctl_number_segments = num_segs; control->ctl_total_length = length; } -static int read_text (ARG(SHORT, action), ARG(ISC_BLOB_CTL, control)) -ARGLIST(SHORT action) -ARGLIST(ISC_BLOB_CTL control) +static int read_text (SHORT action, ISC_BLOB_CTL control) { /************************************** * @@ -337,3 +324,4 @@ for (;;) return isc_segstr_eof; } + diff --git a/examples/api/api9f.def b/examples/api/api9f.def index cfe8776d04..077d5269b1 100644 --- a/examples/api/api9f.def +++ b/examples/api/api9f.def @@ -19,3 +19,4 @@ DESCRIPTION 'api9f.dll' DATA READ WRITE EXPORTS desc_filter + diff --git a/examples/api/apifull.c b/examples/api/apifull.c index cbde2716d5..de6769fcef 100644 --- a/examples/api/apifull.c +++ b/examples/api/apifull.c @@ -20,9 +20,6 @@ * All Rights Reserved. * Contributor(s): ______________________________________. */ -/* -$Id: apifull.c,v 1.4 2004-01-21 07:16:04 skidder Exp $ -*/ #include #include @@ -77,9 +74,7 @@ int ret; #endif -int main (ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main (int argc, char** argv) { int query[MAXLEN]; XSQLDA * sqlda; @@ -126,7 +121,7 @@ ARGLIST(char **argv) /* We must pass the address of sqlda, in case it ** gets re-allocated */ - ret = process_statement((XSQLDA **) &sqlda, + ret = process_statement(&sqlda, (char *) query); if (ret == 1) break; @@ -138,12 +133,12 @@ ARGLIST(char **argv) if (isc_commit_transaction(status, &trans)) { ERREXIT(status,1); - }; + } if (isc_detach_database(status, &db)) { - ERREXIT(status,1); - }; + ERREXIT(status,1); + } return ret; } @@ -156,10 +151,7 @@ ARGLIST(char **argv) ** which will print the error and continue. */ -process_statement (ARG(XSQLDA **, sqldap), - ARG(char *, query)) -ARGLIST(XSQLDA **sqldap) -ARGLIST(char *query) +process_statement (XSQLDA **sqldap, char *query) { int buffer[MAXLEN]; XSQLDA *sqlda; @@ -295,8 +287,8 @@ ARGLIST(char *query) /* Close cursor */ if (isc_dsql_free_statement(status, &stmt, DSQL_close)) { - ERREXIT (status,2); - }; + ERREXIT (status,2); + } if (fetch_stat != 100L) { @@ -309,8 +301,7 @@ ARGLIST(char *query) /* * Print column's data. */ -void print_column (ARG(XSQLVAR *, var)) -ARGLIST(XSQLVAR *var) +void print_column (XSQLVAR *var) { short dtype; char data[MAXLEN], *p; @@ -444,7 +435,7 @@ ARGLIST(XSQLVAR *var) sprintf (p, "%*" ISC_INT64_FORMAT "d%", field_width, (ISC_INT64) value); - }; + } break; case SQL_FLOAT: @@ -512,8 +503,7 @@ ARGLIST(XSQLVAR *var) * Prompt for and get input. * Statements are terminated by a semicolon. */ -int get_statement (ARG(char *,buf)) -ARGLIST(char *buf) +int get_statement (char *buf) { short c; char *p; diff --git a/examples/api/example.def b/examples/api/example.def index ad7a7798e5..f237f60ebc 100644 --- a/examples/api/example.def +++ b/examples/api/example.def @@ -23,3 +23,4 @@ CODE PRELOAD MOVEABLE DISCARDABLE DATA PRELOAD MOVEABLE MULTIPLE HEAPSIZE 4096 STACKSIZE 15000 + diff --git a/examples/api/winevent.c b/examples/api/winevent.c index 175fd3ee25..aa3810912a 100644 --- a/examples/api/winevent.c +++ b/examples/api/winevent.c @@ -78,7 +78,7 @@ ISC_STATUS_ARRAY status; ** FUNCTION PROTOTYPES */ -long FAR PASCAL _export WndProc (HWND, UINT, UINT, LONG) ; +LRESULT CALLBACK _export WndProc (HWND, UINT, WPARAM, LPARAM) ; HWND InitApplication(int nCmdShow, HINSTANCE hPrevInstance); int InitEvent(EVENTBLK *lpEvent, long *DB, HWND hWnd, char *event); @@ -112,7 +112,7 @@ int CHK_ERR(long *gds__status); * * ****************************************************************/ -int PASCAL WinMain (HINSTANCE hInst, HINSTANCE hPrevInstance, +int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow) { MSG msg; @@ -301,8 +301,8 @@ void ReleaseEvents (EVENTBLK *lpEvent) * results from DefWindowProc otherwise * *****************************************************************/ -long FAR PASCAL _export WndProc (HWND hWnd, UINT message, UINT wParam, - LONG lParam) +LRESULT CALLBACK _export WndProc (HWND hWnd, UINT message, WPARAM wParam, + LPARAM lParam) { EVENTBLK *lpEvent; ISC_STATUS_ARRAY Vector; @@ -367,7 +367,7 @@ long FAR PASCAL _export WndProc (HWND hWnd, UINT message, UINT wParam, * none * *****************************************************************/ -void far AstRoutine (EVENTBLK *lpEvent, short length, char *updated) +void AstRoutine (EVENTBLK *lpEvent, short length, char *updated) { char *ResultBuf = lpEvent->ResultBuf; @@ -420,3 +420,4 @@ int CHK_ERR (long *status) return FALSE; } + diff --git a/examples/api/winevent.def b/examples/api/winevent.def index 6dc204a359..5d068db548 100644 --- a/examples/api/winevent.def +++ b/examples/api/winevent.def @@ -31,3 +31,4 @@ STACKSIZE 15000 EXPORTS ; This needs an "_" prefix since it is a cdecl function _AstRoutine + diff --git a/examples/api/winevent.rc b/examples/api/winevent.rc index 80c9cf29b3..bf6a6ba3dd 100644 --- a/examples/api/winevent.rc +++ b/examples/api/winevent.rc @@ -26,3 +26,4 @@ Events MENU MENUITEM "E&xit", 1 } } + diff --git a/examples/dyn/dyn1.e b/examples/dyn/dyn1.e index 48138071d7..e0152c0425 100644 --- a/examples/dyn/dyn1.e +++ b/examples/dyn/dyn1.e @@ -41,9 +41,7 @@ char *insert_date = "INSERT INTO dbinfo VALUES ('NOW')"; EXEC SQL SET DATABASE db = COMPILETIME "employee.fdb"; -int main(ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main(int argc, char** argv) { db = NULL; @@ -133,8 +131,7 @@ ARGLIST(char **argv) * Print the status, the SQLCODE, and exit. * Also, indicate which operation the error occured on. */ -void pr_error(ARG(char *, operation)) -ARGLIST(char *operation) +void pr_error(char* operation) { printf("[\n"); printf("PROBLEM ON \"%s\".\n", operation); @@ -145,3 +142,4 @@ ARGLIST(char *operation) printf("]\n"); } + diff --git a/examples/dyn/dyn2.e b/examples/dyn/dyn2.e index 10b8deecbb..8b4f231e72 100644 --- a/examples/dyn/dyn2.e +++ b/examples/dyn/dyn2.e @@ -47,9 +47,7 @@ EXEC SQL SET DATABASE empdb = "employee.fdb" RUNTIME :Db_name; -int main(ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main(int argc, char** argv) { BASED_ON department.department dept_name; BASED_ON department.dept_no dept_id; @@ -132,8 +130,7 @@ MainError: /* * Construct an 'insert' statement from the supplied parameters. */ -int get_line(ARG(char *, line)) -ARGLIST(char *line) +int get_line(char* line) { if (Dept_data[Dept_ptr] == 0) return 0; @@ -172,3 +169,4 @@ CleanErr: printf("SQLCODE=%d\n", SQLCODE); exit(1); } + diff --git a/examples/dyn/dyn3.e b/examples/dyn/dyn3.e index 1a27e75cbd..d379889499 100644 --- a/examples/dyn/dyn3.e +++ b/examples/dyn/dyn3.e @@ -43,9 +43,7 @@ EXEC SQL SET DATABASE empdb = "employee.fdb" RUNTIME :Db_name; -int main(ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main(int argc, char** argv) { SQL_VARCHAR(15) first_name; @@ -144,3 +142,4 @@ void print_error (void) isc_print_status(gds__status); printf("SQLCODE=%d\n", SQLCODE); } + diff --git a/examples/dyn/dyn4.e b/examples/dyn/dyn4.e index 79da2fbcef..7552a0986e 100644 --- a/examples/dyn/dyn4.e +++ b/examples/dyn/dyn4.e @@ -47,9 +47,7 @@ char *upd_str = "UPDATE department SET budget = ? * budget + budget WHERE dept_no = ?"; -int main(ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main(int argc, char** argv) { BASED_ON department.dept_no dept_no; double percent_inc; @@ -148,9 +146,7 @@ Error: /* * Get the department and percent parameters. */ -int get_input(ARG(char *, dept_no), ARG(double *, percent)) -ARGLIST(char *dept_no) -ARGLIST(double *percent) +int get_input(char* dept_no, double* percent) { if (Dept_data[Input_ptr] == 0) return 0; @@ -162,3 +158,4 @@ ARGLIST(double *percent) return(1); } + diff --git a/examples/dyn/dyn5.e b/examples/dyn/dyn5.e index 7605e7a7c8..a76297a622 100644 --- a/examples/dyn/dyn5.e +++ b/examples/dyn/dyn5.e @@ -40,9 +40,7 @@ EXEC SQL SET DATABASE empdb = "employee.fdb" RUNTIME :Db_name; -int main(ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main(int argc, char** argv) { short num_cols, i; XSQLDA *sqlda; @@ -125,3 +123,4 @@ Error: printf("SQLCODE=%d\n", SQLCODE); return(1); } + diff --git a/examples/dyn/dynfull.e b/examples/dyn/dynfull.e index 0777bc95f5..a54aa1ffb5 100644 --- a/examples/dyn/dynfull.e +++ b/examples/dyn/dynfull.e @@ -20,9 +20,6 @@ * All Rights Reserved. * Contributor(s): ______________________________________. */ -/* -$Id: dynfull.e,v 1.3 2004-01-21 07:16:05 skidder Exp $ -*/ #include "example.h" #include @@ -65,9 +62,7 @@ EXEC SQL -int main(ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main(int argc, char** argv) { char query[MAXLEN]; XSQLDA *sqlda; @@ -114,10 +109,7 @@ ARGLIST(char **argv) } -void process_statement(ARG(XSQLDA * *, sqldap), - ARG(char *, query)) - ARGLIST(XSQLDA **sqldap) - ARGLIST(char *query) +void process_statement(XSQLDA** sqldap, char* query) { int buffer[MAXLEN]; XSQLVAR *var; @@ -250,8 +242,7 @@ Error: /* * Print column's data. */ -void print_column(ARG(XSQLVAR *, var)) -ARGLIST(XSQLVAR *var) +void print_column(XSQLVAR* var) { short dtype; char data[MAXLEN], *p; @@ -384,7 +375,7 @@ ARGLIST(XSQLVAR *var) sprintf (p, "%*" ISC_INT64_FORMAT "d%", field_width, (ISC_INT64) value); - }; + } break; case SQL_FLOAT: @@ -452,8 +443,7 @@ ARGLIST(XSQLVAR *var) * Prompt for and get input. * Statements are terminated by a semicolon. */ -int get_statement(ARG(char *, buf)) - ARGLIST(char *buf) +int get_statement(char* buf) { short c; char *p; @@ -497,3 +487,4 @@ int get_statement(ARG(char *, buf)) cnt++; } } + diff --git a/examples/include/align.h b/examples/include/align.h index 1446aa6f10..9a3b762957 100644 --- a/examples/include/align.h +++ b/examples/include/align.h @@ -21,9 +21,6 @@ * 2002.10.28 Sean Leyne - Code cleanup, removed obsolete "SGI" port * */ -/* -$Id: align.h,v 1.1 2003-07-10 23:04:39 brodsom Exp $ -*/ #ifdef VMS #define FB_ALIGN(n,b) (n) @@ -50,3 +47,4 @@ $Id: align.h,v 1.1 2003-07-10 23:04:39 brodsom Exp $ #ifndef FB_ALIGN #define FB_ALIGN(n,b) ((n+1) & ~1) #endif + diff --git a/examples/include/example.h b/examples/include/example.h index bab3ebb54d..ca2bd9684a 100644 --- a/examples/include/example.h +++ b/examples/include/example.h @@ -16,15 +16,6 @@ * All Rights Reserved. * Contributor(s): ______________________________________. */ -#if defined __STDC__ || defined __BORLANDC__ || defined _MSC_VER -#define PROTO(args) args -#define ARG(type, arg) type arg -#define ARGLIST(arg) -#else -#define PROTO(args) () -#define ARG(type, arg) arg -#define ARGLIST(arg) arg; -#endif #if defined __BORLANDC__ && defined __WIN32__ #define EXPORT _export @@ -33,3 +24,4 @@ #endif #define ERREXIT(status, rc) {isc_print_status(status); return rc;} + diff --git a/examples/stat/stat1.e b/examples/stat/stat1.e index 1b735ee94d..916c4ab68d 100644 --- a/examples/stat/stat1.e +++ b/examples/stat/stat1.e @@ -67,7 +67,7 @@ int main (void) ROLLBACK RELEASE; printf("\nUNDONE.\n\n"); } -return 0; + return 0; } @@ -99,3 +99,4 @@ void clean_up (void) EXEC SQL COMMIT WORK; } + diff --git a/examples/stat/stat10.e b/examples/stat/stat10.e index 1492a62855..ef5d083c93 100644 --- a/examples/stat/stat10.e +++ b/examples/stat/stat10.e @@ -177,7 +177,7 @@ int main (void) EXEC SQL DISCONNECT ALL; -return (0); + return (0); } @@ -196,7 +196,7 @@ int count_types (void) else if( pr_error()) return 1;; -return (0); + return (0); } @@ -216,7 +216,7 @@ int count_records (void) else if( pr_error()) return 1;; -return (0); + return (0); } @@ -230,5 +230,6 @@ long pr_error (void) isc_print_sqlerror(SQLCODE, isc_status); printf("\n"); } -return (SQLCODE); + return (SQLCODE); } + diff --git a/examples/stat/stat11.e b/examples/stat/stat11.e index f6f6ea057c..107cbfb65e 100644 --- a/examples/stat/stat11.e +++ b/examples/stat/stat11.e @@ -51,9 +51,7 @@ EXEC SQL -int main(ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main(int argc, char** argv) { if (argc > 1) @@ -165,7 +163,7 @@ ARGLIST(char **argv) EXEC SQL DISCONNECT empdb; -return (0); + return (0); err: isc_print_status(isc_status); return 1; diff --git a/examples/stat/stat12.e b/examples/stat/stat12.e index 520154a45e..f6a4dc3f90 100644 --- a/examples/stat/stat12.e +++ b/examples/stat/stat12.e @@ -53,9 +53,7 @@ EXEC SQL END DECLARE SECTION; -int main(ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main(int argc, char** argv) { int ret = 0; BASED_ON sales.po_number pon; @@ -124,8 +122,7 @@ Error: /* * Initiate order processing for a newly received sales order. */ -int process_order(ARG(char *, pon)) -ARGLIST(char * pon) +int process_order(char* pon) { /* * This function would start a back-ground job, such as @@ -141,3 +138,4 @@ ARGLIST(char * pon) } return 0; } + diff --git a/examples/stat/stat12t.e b/examples/stat/stat12t.e index 899d1e1feb..3de771de78 100644 --- a/examples/stat/stat12t.e +++ b/examples/stat/stat12t.e @@ -35,9 +35,7 @@ EXEC SQL EXEC SQL END DECLARE SECTION; -int main(ARG(int, argc), ARG(char **, argv)) -ARGLIST(int argc) -ARGLIST(char **argv) +int main(int argc, char** argv) { EXEC SQL CONNECT empdb; @@ -81,3 +79,4 @@ ARGLIST(char **argv) exit(0); } + diff --git a/examples/stat/stat2.e b/examples/stat/stat2.e index c24b264b51..b78c7bf00c 100644 --- a/examples/stat/stat2.e +++ b/examples/stat/stat2.e @@ -85,6 +85,6 @@ int main (void) EXEC SQL COMMIT RELEASE; -exit(0); + exit(0); } diff --git a/examples/stat/stat3.e b/examples/stat/stat3.e index 3a9d3381af..f3a3cae01b 100644 --- a/examples/stat/stat3.e +++ b/examples/stat/stat3.e @@ -92,13 +92,13 @@ AllDone: EXEC SQL COMMIT RELEASE; -return 0; + return 0; /* * Print the error, and exit. */ Error: isc_print_sqlerror((short)SQLCODE, gds__status); -return 1; + return 1; } diff --git a/examples/stat/stat4.e b/examples/stat/stat4.e index 0853790747..1bef42ad4f 100644 --- a/examples/stat/stat4.e +++ b/examples/stat/stat4.e @@ -87,11 +87,11 @@ int main (void) EXEC SQL COMMIT RELEASE; -return 0; + return 0; Error1: pr_error(); -return 1; + return 1; } @@ -156,11 +156,11 @@ void build_tree (void) if (SQLCODE == 100) return; - }; + } Error2: pr_error(); -return ; + return; } @@ -171,3 +171,4 @@ void pr_error (void) { isc_print_sqlerror((short)SQLCODE, gds__status); } + diff --git a/examples/stat/stat6.e b/examples/stat/stat6.e index 2f39b2b6d9..b3f0e244f5 100644 --- a/examples/stat/stat6.e +++ b/examples/stat/stat6.e @@ -101,10 +101,10 @@ int main (void) EXEC SQL COMMIT WORK; -return 0; + return 0; Error: isc_print_sqlerror((short) SQLCODE, gds__status); -return 1; + return 1; } diff --git a/examples/stat/stat7.e b/examples/stat/stat7.e index 63bea57e93..578a775fe8 100644 --- a/examples/stat/stat7.e +++ b/examples/stat/stat7.e @@ -105,10 +105,10 @@ int main (void) EXEC SQL COMMIT; -return 0; + return 0; Error: isc_print_sqlerror((short) SQLCODE, gds__status); -return 1; + return 1; } diff --git a/examples/stat/stat8.e b/examples/stat/stat8.e index 1cc558a36b..c25e5b02c1 100644 --- a/examples/stat/stat8.e +++ b/examples/stat/stat8.e @@ -126,11 +126,11 @@ int main (void) COMMIT RELEASE; printf("\n\nAdded %d project descriptions.\n", rec_cnt); -return 0; + return 0; Error: isc_print_sqlerror((short) SQLCODE, isc_status); -return 1; + return 1; } diff --git a/examples/stat/stat9.e b/examples/stat/stat9.e index 7626af4b52..9e5a824a6e 100644 --- a/examples/stat/stat9.e +++ b/examples/stat/stat9.e @@ -34,7 +34,7 @@ EXEC SQL INCLUDE SQLCA; void select_projects (short emp_no); void get_params (short *emp_no, char* proj_id); void pr_error (long status); -int add_emp_proj (short emp_no,char * proj_id); +void add_emp_proj (short emp_no,char * proj_id); @@ -73,8 +73,7 @@ int main (void) * Select from a stored procedure. * Procedure 'get_emp_proj' gets employee's projects. */ -void select_projects(ARG(short, emp_no)) - ARGLIST(short emp_no) +void select_projects(BASED_ON employee.emp_no emp_no) { BASED_ON project.proj_id proj_id; @@ -118,10 +117,7 @@ SelError: * Execute a stored procedure. * Procedure 'add_emp_proj' adds an employee to a project. */ -add_emp_proj(ARG(short, emp_no), - ARG(char *, proj_id)) - ARGLIST(BASED_ON employee.emp_no emp_no) - ARGLIST(BASED_ON project.proj_id proj_id) +void add_emp_proj(BASED_ON employee.emp_no emp_no, BASED_ON project.proj_id proj_id) { EXEC SQL WHENEVER SQLERROR GO TO AddError; @@ -141,10 +137,7 @@ AddError: /* * Set-up procedure parameters and clean-up old data. */ -void get_params(ARG(short *, emp_no), - ARG(char *, proj_id)) -ARGLIST(BASED_ON employee.emp_no *emp_no) -ARGLIST(BASED_ON project.proj_id proj_id) +void get_params(BASED_ON employee.emp_no *emp_no, BASED_ON project.proj_id proj_id) { *emp_no = 8; strcpy(proj_id, "MAPDB"); @@ -165,8 +158,7 @@ CleanupError: /* * Print an error message. */ -void pr_error(ARG(long, status)) - ARGLIST(long status) +void pr_error(long status) { isc_print_sqlerror(SQLCODE, gds__status); }