From f4776c21d77316b393d2ae964ca0d26af391cbbd Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Wed, 27 Jun 2018 16:08:50 -0600 Subject: [PATCH] dtappbuilder: remove register keyword --- .../dtappbuilder/src/ab/abobj_select.c | 2 +- cde/programs/dtappbuilder/src/ab/conn_obj.c | 10 +++---- cde/programs/dtappbuilder/src/ab/conn_stubs.c | 12 ++++----- cde/programs/dtappbuilder/src/ab/pal.c | 6 ++--- cde/programs/dtappbuilder/src/ab/pal_create.c | 2 +- cde/programs/dtappbuilder/src/abmf/msg_file.c | 20 +++++++------- .../dtappbuilder/src/abmf/ui_header_file.c | 2 +- .../src/libABil/abuil_resource_attr_map.c | 2 +- .../src/libABil/abuil_widget_obj_map.c | 2 +- cde/programs/dtappbuilder/src/libABil/bil.c | 4 +-- .../dtappbuilder/src/libABil/bil_lexer.c | 2 +- .../dtappbuilder/src/libABobj/obj_args.c | 26 +++++++++---------- .../dtappbuilder/src/libABobj/obj_utils.c | 4 +-- cde/programs/dtappbuilder/src/libABobj/trav.c | 4 +-- .../dtappbuilder/src/libABobjXm/objxm_args.c | 14 +++++----- .../dtappbuilder/src/libABobjXm/objxm_strs.c | 8 +++--- .../dtappbuilder/src/libAButil/abio.c | 6 ++--- .../dtappbuilder/src/libAButil/abio_path.c | 14 +++++----- .../dtappbuilder/src/libAButil/istr.c | 6 ++--- 19 files changed, 73 insertions(+), 73 deletions(-) diff --git a/cde/programs/dtappbuilder/src/ab/abobj_select.c b/cde/programs/dtappbuilder/src/ab/abobj_select.c index cd98fb75..80b9ae58 100644 --- a/cde/programs/dtappbuilder/src/ab/abobj_select.c +++ b/cde/programs/dtappbuilder/src/ab/abobj_select.c @@ -506,7 +506,7 @@ draw_select_feedback( Widget selWidget; Dimension width = 0; Dimension height = 0; - register int x0,y0,x1,y1; + int x0,y0,x1,y1; int border_w; Display *display; Drawable drawable; diff --git a/cde/programs/dtappbuilder/src/ab/conn_obj.c b/cde/programs/dtappbuilder/src/ab/conn_obj.c index 22f1c584..1d267ecd 100644 --- a/cde/programs/dtappbuilder/src/ab/conn_obj.c +++ b/cde/programs/dtappbuilder/src/ab/conn_obj.c @@ -720,7 +720,7 @@ connP_get_when_labels( if (when_label_list == NULL) { - register int i; + int i; when_label_list = (STRING *)XtMalloc( sizeof(STRING) * ((int)AB_WHEN_NUM_VALUES - 1)); @@ -741,7 +741,7 @@ connP_get_act_labels( if (stdact_label_list == NULL) { - register int i; + int i; stdact_label_list = (STRING *)XtMalloc( sizeof(STRING) * ((int)AB_BUILTIN_ACTION_NUM_VALUES - 1)); @@ -923,7 +923,7 @@ connP_make_conn_string( ABObj action_obj ) { - register int i; + int i; long si; static char conn_string[BUFSIZ]; char buf[BUFSIZ]; @@ -1045,7 +1045,7 @@ connP_get_obj_type_index( int ab_subtype ) { - register long i; + long i; if (connP_objtype_needs_subtype(ab_type, ab_subtype)) { @@ -1268,7 +1268,7 @@ connP_objtype_needs_subtype( int obj_subtype ) { - register int i; + int i; for (i = 0; i < ConnP_num_conn_objs; i++) { diff --git a/cde/programs/dtappbuilder/src/ab/conn_stubs.c b/cde/programs/dtappbuilder/src/ab/conn_stubs.c index 36b81f86..5b2370c0 100644 --- a/cde/programs/dtappbuilder/src/ab/conn_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/conn_stubs.c @@ -800,7 +800,7 @@ populate_connection_list( for (trav_open(&trav, project, AB_TRAV_ACTIONS); (obj = trav_next(&trav)) != NULL; ) { - register XmString xm_item_str; + XmString xm_item_str; if (is_action_type(obj, ConnP_view_filter)) { @@ -1353,7 +1353,7 @@ get_cur_when( Widget label_wid = XmOptionButtonGadget(when_menu); XmString xm_when_label = (XmString)NULL; char *when_label = NULL; - register int i; + int i; XtVaGetValues(label_wid, XmNlabelString, &xm_when_label, NULL); if (xm_when_label != NULL) { @@ -1382,7 +1382,7 @@ get_cur_act( Widget label_wid = XmOptionButtonGadget(action_menu); XmString xm_act_label = (XmString)NULL; char *act_label = NULL; - register int i; + int i; XtVaGetValues(label_wid, XmNlabelString, &xm_act_label, NULL); if (xm_act_label != NULL) { @@ -1408,7 +1408,7 @@ set_cur_when( AB_WHEN new_when ) { - register int i; + int i; for (i = 0; i < ConnP_num_conn_whens; i++) { @@ -1430,7 +1430,7 @@ set_cur_act( AB_BUILTIN_ACTION new_act ) { - register int i; + int i; for (i = 0; i < ConnP_num_conn_acts; i++) if (new_act == ConnP_conn_acts[i].act_type) @@ -3872,7 +3872,7 @@ get_cur_func_type(void) Widget label_wid = XmOptionButtonGadget(action_type_opmenu); XmString xm_act_label = (XmString)NULL; char *act_label = NULL; - register int i; + int i; AB_FUNC_TYPE func_type = AB_FUNC_UNDEF; XtVaGetValues(label_wid, XmNlabelString, &xm_act_label, NULL); diff --git a/cde/programs/dtappbuilder/src/ab/pal.c b/cde/programs/dtappbuilder/src/ab/pal.c index c550daec..296e0092 100644 --- a/cde/programs/dtappbuilder/src/ab/pal.c +++ b/cde/programs/dtappbuilder/src/ab/pal.c @@ -88,10 +88,10 @@ static PalEditableObjInfo *pal_ed_obj_head = NULL; * which does the trick. */ static int -strcasecmp(register const char *s1, - register const char *s2) +strcasecmp(const char *s1, + const char *s2) { - register int c1, c2; + int c1, c2; while (*s1 && *s2) { c1 = isupper(*s1) ? tolower(*s1) : *s1; diff --git a/cde/programs/dtappbuilder/src/ab/pal_create.c b/cde/programs/dtappbuilder/src/ab/pal_create.c index 4f6e35d9..68c00d3b 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_create.c +++ b/cde/programs/dtappbuilder/src/ab/pal_create.c @@ -786,7 +786,7 @@ image_copy( int put_x ) { - register int i, j, k, pix; + int i, j, k, pix; Pixel background; Pixel foreground; Pixel bshadow, tshadow; diff --git a/cde/programs/dtappbuilder/src/abmf/msg_file.c b/cde/programs/dtappbuilder/src/abmf/msg_file.c index f33f0fa7..657383bc 100644 --- a/cde/programs/dtappbuilder/src/abmf/msg_file.c +++ b/cde/programs/dtappbuilder/src/abmf/msg_file.c @@ -204,7 +204,7 @@ MsgSet_destroy( if (that->is_generated && that->msgs != (Msg *)NULL) { - register int i; + int i; for (i = 0; i < that->num_msgs; i++) msg_destroy(that->msgs[i]); @@ -257,7 +257,7 @@ MsgSet_just_find_msg( ) { int ret_val = -1; - register int i; + int i; if (that == NULL || string == (char *)NULL) goto cret; @@ -317,7 +317,7 @@ MsgSet_set_msg_is_referenced( BOOL msg_is_referenced ) { - register int i; + int i; if (that == (MsgSet)NULL) goto cret; @@ -413,7 +413,7 @@ MsgFile_destroy( if (that->msg_sets != (MsgSet *)NULL) { - register int i; + int i; for (i = 0; i < that->num_msg_sets; i++) MsgSet_destroy(that->msg_sets[i]); @@ -439,7 +439,7 @@ MsgFile_save( { int ret_val = 0; FILE *fp = NULL; - register int i; + int i; *msgFileOutPtr = NULL; @@ -547,7 +547,7 @@ MsgFile_just_find_msg_set( ) { MsgSet ret_val = (MsgSet)NULL; - register int i; + int i; if (that == (MsgFile)NULL) goto cret; @@ -725,7 +725,7 @@ msgFile_get_msg_set_by_num( ) { MsgSet ret_val = (MsgSet)NULL; - register int i; + int i; if (that == NULL) goto cret; @@ -794,7 +794,7 @@ msgFile_max_set_number( ) { int ret_val = 0; - register int i; + int i; if (that == NULL) goto cret; @@ -904,7 +904,7 @@ msgSet_output( ) { char *set_name; - register int i; + int i; if (that == (MsgSet)NULL) goto cret; @@ -1001,7 +1001,7 @@ msgSet_max_msg_number( ) { int ret_val = 0; - register int i; + int i; if (that == NULL) goto cret; diff --git a/cde/programs/dtappbuilder/src/abmf/ui_header_file.c b/cde/programs/dtappbuilder/src/abmf/ui_header_file.c index bbf56df1..7d1723c0 100644 --- a/cde/programs/dtappbuilder/src/abmf/ui_header_file.c +++ b/cde/programs/dtappbuilder/src/abmf/ui_header_file.c @@ -270,7 +270,7 @@ abmfP_obj_get_widget_specific_includes(StringList includesList, ABObj obj) int return_value = 0; int num_includes = 0; BOOL objHasScrollbar = FALSE; - register IncludeForClass include = class_includes; + IncludeForClass include = class_includes; /* * Get optional widget parts diff --git a/cde/programs/dtappbuilder/src/libABil/abuil_resource_attr_map.c b/cde/programs/dtappbuilder/src/libABil/abuil_resource_attr_map.c index 29a80dca..0b6642b1 100644 --- a/cde/programs/dtappbuilder/src/libABil/abuil_resource_attr_map.c +++ b/cde/programs/dtappbuilder/src/libABil/abuil_resource_attr_map.c @@ -3168,7 +3168,7 @@ abuilP_store_attr_in_abobj( AB_OBJECT_TYPE ab_type = obj_get_type(obj); unsigned long obj_mask = BMASK(ab_type); AttrMap *maps = match->attr_maps; - register int i; + int i; /* REMIND: fprintf(stderr,"Searching matched maps\n"); */ for (i = 0; i < match->num_maps; i++) diff --git a/cde/programs/dtappbuilder/src/libABil/abuil_widget_obj_map.c b/cde/programs/dtappbuilder/src/libABil/abuil_widget_obj_map.c index 6dc5c990..3430d304 100644 --- a/cde/programs/dtappbuilder/src/libABil/abuil_widget_obj_map.c +++ b/cde/programs/dtappbuilder/src/libABil/abuil_widget_obj_map.c @@ -278,7 +278,7 @@ abuilP_entry_for_uil_widget( if (b_type > sym_k_error_object) { - register int i; + int i; STRING widget_class_name = uil_widget_names[b_type]; for (i = 0; i < XtNumber(widget_abobj_map); i++) diff --git a/cde/programs/dtappbuilder/src/libABil/bil.c b/cde/programs/dtappbuilder/src/libABil/bil.c index 32dfdbd0..575a6445 100644 --- a/cde/programs/dtappbuilder/src/libABil/bil.c +++ b/cde/programs/dtappbuilder/src/libABil/bil.c @@ -1720,8 +1720,8 @@ BIL_TOKEN bilP_string_to_token(STRING strToken) { ISTRING istrToken = istr_create(strToken); - register long midDiff; - register long midIndex; + long midDiff; + long midIndex; long minIndex, maxIndex; bil_token_table_check_init(); diff --git a/cde/programs/dtappbuilder/src/libABil/bil_lexer.c b/cde/programs/dtappbuilder/src/libABil/bil_lexer.c index d168954e..95eb04ee 100644 --- a/cde/programs/dtappbuilder/src/libABil/bil_lexer.c +++ b/cde/programs/dtappbuilder/src/libABil/bil_lexer.c @@ -120,7 +120,7 @@ AByylex(void) static int get_token(FILE *file) { - register int c; /* static for speed */ + int c; /* static for speed */ while (TRUE) { diff --git a/cde/programs/dtappbuilder/src/libABobj/obj_args.c b/cde/programs/dtappbuilder/src/libABobj/obj_args.c index af44593e..c420b3d6 100644 --- a/cde/programs/dtappbuilder/src/libABobj/obj_args.c +++ b/cde/programs/dtappbuilder/src/libABobj/obj_args.c @@ -215,9 +215,9 @@ obj_set_typed_arg_if_new( ABTypedArg obj_get_typed_arg(ABObj obj, char *name) { - register int num_args; - register int i; - register ABTypedArg arg_list= NULL; + int num_args; + int i; + ABTypedArg arg_list= NULL; ABTypedArg arg= NULL; ISTRING iname= istr_get_existing(name); @@ -246,9 +246,9 @@ obj_get_typed_arg(ABObj obj, char *name) ABArg obj_get_arg(ABObj obj, char *name) { - register int num_args; - register int i; - register ABArg arg_list; + int num_args; + int i; + ABArg arg_list; ABArg arg= NULL; ISTRING iname= istr_get_existing(name); @@ -324,9 +324,9 @@ MergeTypedArgLists(ABTypedArg args1, int num_args1, int obj_remove_arg(ABObj obj, STRING name) { - register int i; - register ABArgList args; - register int nargs; + int i; + ABArgList args; + int nargs; ISTRING iname= istr_get_existing(name); if ((obj == NULL) || (obj->args == NULL) ) @@ -412,8 +412,8 @@ abo_merge_typed_args(ABObj obj, ABTypedArg arg) int obj_get_num_args(ABObj obj) { - register ABArgList args= obj->args; - register int n = 0; + ABArgList args= obj->args; + int n = 0; for ( ; (args != (ABArgList)NULL) && (args->name != NULL); args++, n++) @@ -429,8 +429,8 @@ obj_get_num_args(ABObj obj) int obj_get_num_typed_args(ABObj obj) { - register ABTypedArg args = obj->typed_args; - register int n = 0; + ABTypedArg args = obj->typed_args; + int n = 0; for ( ; (args != NULL) && (args->name != NULL); args++, n++) { diff --git a/cde/programs/dtappbuilder/src/libABobj/obj_utils.c b/cde/programs/dtappbuilder/src/libABobj/obj_utils.c index 1b77f3db..95083f31 100644 --- a/cde/programs/dtappbuilder/src/libABobj/obj_utils.c +++ b/cde/programs/dtappbuilder/src/libABobj/obj_utils.c @@ -644,8 +644,8 @@ ab_make_valid_c_ident(STRING label) static char name[MAXPATHLEN]; static int ith = 0; int lastchar = -1; - register char *oldPtr = label; - register char *newPtr = name; + char *oldPtr = label; + char *newPtr = name; if (isdigit(*oldPtr)) { diff --git a/cde/programs/dtappbuilder/src/libABobj/trav.c b/cde/programs/dtappbuilder/src/libABobj/trav.c index 4e4e7f00..2de1969f 100644 --- a/cde/programs/dtappbuilder/src/libABobj/trav.c +++ b/cde/programs/dtappbuilder/src/libABobj/trav.c @@ -478,8 +478,8 @@ find_first_ancestor_sibling_child(ABObj obj, ABTraversal trav) static BOOL travP_qualifies(ABTraversal trav) { - register ABObj curObj = trav->curObj; - register BOOL qualifies= TRUE; + ABObj curObj = trav->curObj; + BOOL qualifies= TRUE; if (obj_has_impl_flags(curObj, ObjFlagDestroyed)) { diff --git a/cde/programs/dtappbuilder/src/libABobjXm/objxm_args.c b/cde/programs/dtappbuilder/src/libABobjXm/objxm_args.c index ae51e0dc..0f79fd0e 100644 --- a/cde/programs/dtappbuilder/src/libABobjXm/objxm_args.c +++ b/cde/programs/dtappbuilder/src/libABobjXm/objxm_args.c @@ -268,8 +268,8 @@ objxm_get_arg( char *name ) { - register int num_args; - register int i; + int num_args; + int i; Arg *argptr = NULL; num_args = objxm_get_num_args(arglist); @@ -422,8 +422,8 @@ objxm_get_num_args( ArgList arglist ) { - register ArgList args = arglist; - register int n = 0; + ArgList args = arglist; + int n = 0; for ( ; (args != (ArgList)NULL) && (args->name != NULL); args++, n++) @@ -441,9 +441,9 @@ objxm_remove_arg( STRING name ) { - register int i; - register ArgList args; - register int nargs; + int i; + ArgList args; + int nargs; if (*p_arglist == NULL) { diff --git a/cde/programs/dtappbuilder/src/libABobjXm/objxm_strs.c b/cde/programs/dtappbuilder/src/libABobjXm/objxm_strs.c index 934844d7..6ae61774 100644 --- a/cde/programs/dtappbuilder/src/libABobjXm/objxm_strs.c +++ b/cde/programs/dtappbuilder/src/libABobjXm/objxm_strs.c @@ -1098,10 +1098,10 @@ build_xm_res_table_xmname_index(void) static ObjxmRes * find_res_entry_by_xmname(ISTRING istr_xmname) { - register int midDiff; - register int midIndex; - register int minIndex, maxIndex; - register ObjxmRes *entry; + int midDiff; + int midIndex; + int minIndex, maxIndex; + ObjxmRes *entry; /* * Perform binary search for ISTRING value diff --git a/cde/programs/dtappbuilder/src/libAButil/abio.c b/cde/programs/dtappbuilder/src/libAButil/abio.c index 55407ab7..31f64e9a 100644 --- a/cde/programs/dtappbuilder/src/libAButil/abio.c +++ b/cde/programs/dtappbuilder/src/libAButil/abio.c @@ -1859,7 +1859,7 @@ abio_put_string(FILE * outFile, STRING s) int abio_put_string_to_file(FILE * outFile, STRING string) { - register STRING ptr; + STRING ptr; char strEndChar = *(abio_string_end_string()); char curChar = 0; @@ -1971,7 +1971,7 @@ abioP_build_indent_string( int new_indent_level ) { - register int i; + int i; int indent_length = 0; out_file = out_file; /* avoid warning */ @@ -2426,7 +2426,7 @@ int abio_put_string_to_buffer(STRING string, STRING outBuf, int size) { #define INC 32 - register STRING ptr; + STRING ptr; char strEndChar = *(abio_string_end_string()); char curChar = 0; int i = 0; diff --git a/cde/programs/dtappbuilder/src/libAButil/abio_path.c b/cde/programs/dtappbuilder/src/libAButil/abio_path.c index ebe390a7..afaaaef5 100644 --- a/cde/programs/dtappbuilder/src/libAButil/abio_path.c +++ b/cde/programs/dtappbuilder/src/libAButil/abio_path.c @@ -275,10 +275,10 @@ util_file_name_is_bil_encapsulated( static void expand_path(char *nm, char *buf) { - register char *s, *d; + char *s, *d; char lnm[MAXPATHLEN]; int q; - register char *trimchars = "\n \t"; + char *trimchars = "\n \t"; /* Strip off leading & trailing whitespace and cr */ while (strchr(trimchars, *nm) != NULL) @@ -303,9 +303,9 @@ expand_path(char *nm, char *buf) break; } else if (*s++ == '$') { - register char *start = d; - register braces = *s == '{'; - register char *value; + char *start = d; + char braces = *s == '{'; + char *value; while (*d++ = *s) if (braces ? *s == '}' : !isalnum(*s)) break; @@ -336,8 +336,8 @@ expand_path(char *nm, char *buf) } else { /* ~user/filename */ - register char *nnm; - register struct passwd *pw; + char *nnm; + struct passwd *pw; for (s = nm; *s && *s != '/'; s++); nnm = *s ? s + 1 : s; *s = 0; diff --git a/cde/programs/dtappbuilder/src/libAButil/istr.c b/cde/programs/dtappbuilder/src/libAButil/istr.c index 6f79b7c5..4148c2ac 100644 --- a/cde/programs/dtappbuilder/src/libAButil/istr.c +++ b/cde/programs/dtappbuilder/src/libAButil/istr.c @@ -861,7 +861,7 @@ hashing( STRING string ) { - register unsigned hash_val = 0; + unsigned hash_val = 0; for (hash_val = 0; *string; ++string) hash_val = hash_val * 65599 + *string; @@ -881,8 +881,8 @@ hash_and_lookupstr( { #define fast_streq(s1,s2) (((s1)[0] == (s2)[0]) && (strcmp(s1,s2) == 0)) - register unsigned hash_val = 0; - register char *stringPtr; + unsigned hash_val = 0; + char *stringPtr; Bucket entry; int *valuePtr; int *valuePtrEnd; -- 2.25.1