From: <xue...@us...> - 2003-05-31 19:52:49
|
Update of /cvsroot/popfile/windows In directory sc8-pr-cvs1:/tmp/cvs-serv18905 Modified Files: CBP.nsh Log Message: Updated the 'page' macro to use the new MUI style, removed redundant code from CBP_HandleUserInput, corrected many defines. Index: CBP.nsh =================================================================== RCS file: /cvsroot/popfile/windows/CBP.nsh,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CBP.nsh 27 May 2003 20:11:27 -0000 1.6 --- CBP.nsh 31 May 2003 19:52:43 -0000 1.7 *************** *** 26,30 **** ; ; #---------------------------------------------------------------------------------------- ! ; # CBP Configuration Data (to change the default settings, un-comment appropriate lines) ; #---------------------------------------------------------------------------------------- ; # ; Maximum number of buckets handled (in range 2 to 8) --- 26,30 ---- ; ; #---------------------------------------------------------------------------------------- ! ; # CBP Configuration Data (to override defaults, un-comment lines below and modify them) ; #---------------------------------------------------------------------------------------- ; # ; Maximum number of buckets handled (in range 2 to 8) *************** *** 102,105 **** --- 102,129 ---- #////////////////////////////////////////////////////////////////////////////////////////////// + ;============================================================================================ + ; (Informal) Coding standard for the CBP Package + ;============================================================================================ + + ; (1) All functions, macros and define statements use the 'CBP_' prefix + ; + ; (2) With the exception of some small library functions, 'defines' are used to give registers + ; 'meaningful' names and make maintenance easier. + ; + ; (3) Similarly, 'defines' are used for constants + ; + ; (4) Naming conventions: local registers are give names starting with 'CBP_L_' and + ; constants are given names starting with 'CBP_C_'. If global registers are introduced, + ; they should use names beginning with 'CBP_G_'. + ; + ; (5) All functions preserve register values using the stack (with the sole exception of the + ; 'leave' function for the custom page - it shares the same registers as the custom page + ; creator function in order to simplify the input validation process) + ; + ; (6) Parameters are passed on the stack (the sole exception is the custom page's + ; 'leave' function) + + ;============================================================================================ + ; Name of the INI file used to create the custom page for this package. Normally the ; 'CBP_CreateBucketsPage' function will call 'CBP_CreateINIfile' to create this INI file *************** *** 181,187 **** Push ${CBP_L_FILE_HANDLE} Push ${CBP_L_TEMP} ! StrCpy ${CBP_L_CORPUS} "" ! IfFileExists ${CBP_L_SOURCE}\popfile.cfg 0 check_default_corpus_locn --- 205,211 ---- Push ${CBP_L_FILE_HANDLE} Push ${CBP_L_TEMP} ! StrCpy ${CBP_L_CORPUS} "" ! IfFileExists ${CBP_L_SOURCE}\popfile.cfg 0 check_default_corpus_locn *************** *** 197,201 **** StrCmp ${CBP_L_RESULT} "bayes_corpus " got_new_corpus Goto loop ! got_old_corpus: StrCpy ${CBP_L_CORPUS} ${CBP_L_TEMP} "" 7 --- 221,225 ---- StrCmp ${CBP_L_RESULT} "bayes_corpus " got_new_corpus Goto loop ! got_old_corpus: StrCpy ${CBP_L_CORPUS} ${CBP_L_TEMP} "" 7 *************** *** 213,217 **** Pop ${CBP_L_CORPUS} StrCmp ${CBP_L_CORPUS} "" check_default_corpus_locn ! ; A non-null corpus parameter has been found in 'popfile.cfg' ; Strip leading/trailing quotes, if any --- 237,241 ---- Pop ${CBP_L_CORPUS} StrCmp ${CBP_L_CORPUS} "" check_default_corpus_locn ! ; A non-null corpus parameter has been found in 'popfile.cfg' ; Strip leading/trailing quotes, if any *************** *** 238,258 **** StrCpy ${CBP_L_TEMP} ${CBP_L_CORPUS} 1 StrCmp ${CBP_L_TEMP} "\" instdir_drive ! StrCpy ${CBP_L_TEMP} ${CBP_L_CORPUS} 1 1 StrCmp ${CBP_L_TEMP} ":" look_for_corpus_files ! ; Assume path can be safely added to $INSTDIR ! StrCpy ${CBP_L_CORPUS} $INSTDIR\${CBP_L_CORPUS} Goto look_for_corpus_files ! sub_folder: StrCpy ${CBP_L_CORPUS} ${CBP_L_CORPUS} "" 2 StrCpy ${CBP_L_CORPUS} $INSTDIR\${CBP_L_CORPUS} Goto look_for_corpus_files ! relative_folder: StrCpy ${CBP_L_RESULT} $INSTDIR ! relative_again: StrCpy ${CBP_L_CORPUS} ${CBP_L_CORPUS} "" 3 --- 262,282 ---- StrCpy ${CBP_L_TEMP} ${CBP_L_CORPUS} 1 StrCmp ${CBP_L_TEMP} "\" instdir_drive ! StrCpy ${CBP_L_TEMP} ${CBP_L_CORPUS} 1 1 StrCmp ${CBP_L_TEMP} ":" look_for_corpus_files ! ; Assume path can be safely added to $INSTDIR ! StrCpy ${CBP_L_CORPUS} $INSTDIR\${CBP_L_CORPUS} Goto look_for_corpus_files ! sub_folder: StrCpy ${CBP_L_CORPUS} ${CBP_L_CORPUS} "" 2 StrCpy ${CBP_L_CORPUS} $INSTDIR\${CBP_L_CORPUS} Goto look_for_corpus_files ! relative_folder: StrCpy ${CBP_L_RESULT} $INSTDIR ! relative_again: StrCpy ${CBP_L_CORPUS} ${CBP_L_CORPUS} "" 3 *************** *** 264,279 **** StrCpy ${CBP_L_CORPUS} ${CBP_L_RESULT}\${CBP_L_CORPUS} Goto look_for_corpus_files ! instdir_drive: StrCpy ${CBP_L_TEMP} $INSTDIR 2 StrCpy ${CBP_L_CORPUS} ${CBP_L_TEMP}${CBP_L_CORPUS} Goto look_for_corpus_files ! check_default_corpus_locn: StrCpy ${CBP_L_CORPUS} ${CBP_L_SOURCE}\corpus ! look_for_corpus_files: ; Save path in INI file for later use by 'CBP_MakePOPFileBucket' ! !insertmacro MUI_INSTALLOPTIONS_WRITE "${CBP_C_INIFILE}" \ "CBP Data" "CorpusPath" "${CBP_L_CORPUS}" --- 288,303 ---- StrCpy ${CBP_L_CORPUS} ${CBP_L_RESULT}\${CBP_L_CORPUS} Goto look_for_corpus_files ! instdir_drive: StrCpy ${CBP_L_TEMP} $INSTDIR 2 StrCpy ${CBP_L_CORPUS} ${CBP_L_TEMP}${CBP_L_CORPUS} Goto look_for_corpus_files ! check_default_corpus_locn: StrCpy ${CBP_L_CORPUS} ${CBP_L_SOURCE}\corpus ! look_for_corpus_files: ; Save path in INI file for later use by 'CBP_MakePOPFileBucket' ! !insertmacro MUI_INSTALLOPTIONS_WRITE "${CBP_C_INIFILE}" \ "CBP Data" "CorpusPath" "${CBP_L_CORPUS}" *************** *** 401,405 **** !insertmacro MUI_INSTALLOPTIONS_READ ${CBP_L_CORPUS} "${CBP_C_INIFILE}" \ "CBP Data" "CorpusPath" ! StrCpy ${CBP_L_UNC} ${CBP_L_CORPUS} 2 ; will be "\\" for UNC-format paths --- 425,429 ---- !insertmacro MUI_INSTALLOPTIONS_READ ${CBP_L_CORPUS} "${CBP_C_INIFILE}" \ "CBP Data" "CorpusPath" ! StrCpy ${CBP_L_UNC} ${CBP_L_CORPUS} 2 ; will be "\\" for UNC-format paths *************** *** 452,456 **** Pop ${CBP_L_CORPUS} Pop ${CBP_L_FIRST_FIELD} ! Exch ${CBP_L_COUNT} ; top of stack now has number of buckets we were unable to create --- 476,480 ---- Pop ${CBP_L_CORPUS} Pop ${CBP_L_FIRST_FIELD} ! Exch ${CBP_L_COUNT} ; top of stack now has number of buckets we were unable to create *************** *** 521,526 **** #============================================================================================== ! !macro CBP_PAGECOMMAND_SELECTBUCKETS CAPTION ! Page custom CBP_CreateBucketsPage "CBP_HandleUserInput" "${CAPTION}" !macroend --- 545,550 ---- #============================================================================================== ! !macro CBP_PAGE_SELECTBUCKETS ! Page custom CBP_CreateBucketsPage "CBP_HandleUserInput" !macroend *************** *** 671,712 **** ; Constants used to position information on the left-half of the page ! !define INFO_LEFT_MARGIN 0 ! !define INFO_RIGHT_MARGIN 131 ; Constants used to position the bucket names ! !define BN_NAME_LEFT 157 ! !define BN_NAME_RIGHT -44 ; Constants used to position the "Remove" boxes ! !define BN_REMOVE_LEFT -42 ! !define BN_REMOVE_RIGHT -1 ; Constants used to define the position of the 8 rows in the bucket list ! !define BN_ROW_1_TOP 12 ! !define BN_ROW_1_BOTTOM 22 ! !define BN_ROW_2_TOP 27 ! !define BN_ROW_2_BOTTOM 37 ! !define BN_ROW_3_TOP 42 ! !define BN_ROW_3_BOTTOM 52 ! !define BN_ROW_4_TOP 57 ! !define BN_ROW_4_BOTTOM 67 ! !define BN_ROW_5_TOP 72 ! !define BN_ROW_5_BOTTOM 82 ! !define BN_ROW_6_TOP 87 ! !define BN_ROW_6_BOTTOM 97 ! !define BN_ROW_7_TOP 102 ! !define BN_ROW_7_BOTTOM 112 ! !define BN_ROW_8_TOP 117 ! !define BN_ROW_8_BOTTOM 127 ; Basic macro used to create the INI file --- 695,736 ---- ; Constants used to position information on the left-half of the page ! !define CBP_INFO_LEFT_MARGIN 0 ! !define CBP_INFO_RIGHT_MARGIN 131 ; Constants used to position the bucket names ! !define CBP_BN_NAME_LEFT 157 ! !define CBP_BN_NAME_RIGHT -44 ; Constants used to position the "Remove" boxes ! !define CBP_BN_REMOVE_LEFT -42 ! !define CBP_BN_REMOVE_RIGHT -1 ; Constants used to define the position of the 8 rows in the bucket list ! !define CBP_BN_ROW_1_TOP 12 ! !define CBP_BN_ROW_1_BOTTOM 22 ! !define CBP_BN_ROW_2_TOP 27 ! !define CBP_BN_ROW_2_BOTTOM 37 ! !define CBP_BN_ROW_3_TOP 42 ! !define CBP_BN_ROW_3_BOTTOM 52 ! !define CBP_BN_ROW_4_TOP 57 ! !define CBP_BN_ROW_4_BOTTOM 67 ! !define CBP_BN_ROW_5_TOP 72 ! !define CBP_BN_ROW_5_BOTTOM 82 ! !define CBP_BN_ROW_6_TOP 87 ! !define CBP_BN_ROW_6_BOTTOM 97 ! !define CBP_BN_ROW_7_TOP 102 ! !define CBP_BN_ROW_7_BOTTOM 112 ! !define CBP_BN_ROW_8_TOP 117 ! !define CBP_BN_ROW_8_BOTTOM 127 ; Basic macro used to create the INI file *************** *** 743,747 **** "Label" \ "${TEXT}" \ ! "${BN_NAME_LEFT}" "${BN_NAME_RIGHT}" "${BN_${ROW}_TOP}" "${BN_${ROW}_BOTTOM}" !macroend --- 767,772 ---- "Label" \ "${TEXT}" \ ! "${CBP_BN_NAME_LEFT}" "${CBP_BN_NAME_RIGHT}" \ ! "${CBP_BN_${ROW}_TOP}" "${CBP_BN_${ROW}_BOTTOM}" !macroend *************** *** 752,756 **** "CheckBox" \ "Remove" \ ! "${BN_REMOVE_LEFT}" "${BN_REMOVE_RIGHT}" "${BN_${ROW}_TOP}" "${BN_${ROW}_BOTTOM}" !macroend --- 777,782 ---- "CheckBox" \ "Remove" \ ! "${CBP_BN_REMOVE_LEFT}" "${CBP_BN_REMOVE_RIGHT}" \ ! "${CBP_BN_${ROW}_TOP}" "${CBP_BN_${ROW}_BOTTOM}" !macroend *************** *** 773,777 **** (and their names) to suit your needs.\r\n\r\nBucket names must be single words, \ using lowercase letters, digits 0 to 9, hyphens and underscores." \ ! "${INFO_LEFT_MARGIN}" "${INFO_RIGHT_MARGIN}" "0" "60" ; Label for the "Create Bucket" ComboBox --- 799,803 ---- (and their names) to suit your needs.\r\n\r\nBucket names must be single words, \ using lowercase letters, digits 0 to 9, hyphens and underscores." \ ! "${CBP_INFO_LEFT_MARGIN}" "${CBP_INFO_RIGHT_MARGIN}" "0" "60" ; Label for the "Create Bucket" ComboBox *************** *** 781,785 **** "Create a new bucket by either selecting a name from the list below or \ typing a name of your own choice in the box below." \ ! "${INFO_LEFT_MARGIN}" "${INFO_RIGHT_MARGIN}" "63" "87" ; ComboBox used to create a new bucket --- 807,811 ---- "Create a new bucket by either selecting a name from the list below or \ typing a name of your own choice in the box below." \ ! "${CBP_INFO_LEFT_MARGIN}" "${CBP_INFO_RIGHT_MARGIN}" "63" "87" ; ComboBox used to create a new bucket *************** *** 788,792 **** "ComboBox" \ "A|B" \ ! "${INFO_LEFT_MARGIN}" "${INFO_RIGHT_MARGIN}" "90" "170" ; Instruction for deleting bucket names from the list --- 814,818 ---- "ComboBox" \ "A|B" \ ! "${CBP_INFO_LEFT_MARGIN}" "${CBP_INFO_RIGHT_MARGIN}" "90" "170" ; Instruction for deleting bucket names from the list *************** *** 796,800 **** "To delete one or more buckets from the list, tick the relevant 'Remove' box(es) \ then click the 'Continue' button." \ ! "${INFO_LEFT_MARGIN}" "${INFO_RIGHT_MARGIN}" "110" "190" ; Label used to display progress reports --- 822,826 ---- "To delete one or more buckets from the list, tick the relevant 'Remove' box(es) \ then click the 'Continue' button." \ ! "${CBP_INFO_LEFT_MARGIN}" "${CBP_INFO_RIGHT_MARGIN}" "110" "190" ; Label used to display progress reports *************** *** 836,861 **** FlushINI "$PLUGINSDIR\${CBP_C_INIFILE}" ! !undef INFO_LEFT_MARGIN ! !undef INFO_RIGHT_MARGIN ! !undef BN_NAME_LEFT ! !undef BN_NAME_RIGHT ! !undef BN_REMOVE_LEFT ! !undef BN_REMOVE_RIGHT ! !undef BN_ROW_1_TOP ! !undef BN_ROW_1_BOTTOM ! !undef BN_ROW_2_TOP ! !undef BN_ROW_2_BOTTOM ! !undef BN_ROW_3_TOP ! !undef BN_ROW_3_BOTTOM ! !undef BN_ROW_4_TOP ! !undef BN_ROW_4_BOTTOM ! !undef BN_ROW_5_TOP ! !undef BN_ROW_5_BOTTOM ! !undef BN_ROW_6_TOP ! !undef BN_ROW_6_BOTTOM ! !undef BN_ROW_7_TOP ! !undef BN_ROW_7_BOTTOM ! !undef BN_ROW_8_TOP ! !undef BN_ROW_8_BOTTOM FunctionEnd --- 862,887 ---- FlushINI "$PLUGINSDIR\${CBP_C_INIFILE}" ! !undef CBP_INFO_LEFT_MARGIN ! !undef CBP_INFO_RIGHT_MARGIN ! !undef CBP_BN_NAME_LEFT ! !undef CBP_BN_NAME_RIGHT ! !undef CBP_BN_REMOVE_LEFT ! !undef CBP_BN_REMOVE_RIGHT ! !undef CBP_BN_ROW_1_TOP ! !undef CBP_BN_ROW_1_BOTTOM ! !undef CBP_BN_ROW_2_TOP ! !undef CBP_BN_ROW_2_BOTTOM ! !undef CBP_BN_ROW_3_TOP ! !undef CBP_BN_ROW_3_BOTTOM ! !undef CBP_BN_ROW_4_TOP ! !undef CBP_BN_ROW_4_BOTTOM ! !undef CBP_BN_ROW_5_TOP ! !undef CBP_BN_ROW_5_BOTTOM ! !undef CBP_BN_ROW_6_TOP ! !undef CBP_BN_ROW_6_BOTTOM ! !undef CBP_BN_ROW_7_TOP ! !undef CBP_BN_ROW_7_BOTTOM ! !undef CBP_BN_ROW_8_TOP ! !undef CBP_BN_ROW_8_BOTTOM FunctionEnd *************** *** 877,883 **** # has been entered to create a new bucket and no buckets have been marked for deletion, it is # assumed that the user is happy with the current list therefore if at least two buckets are ! # in the list the function creates those buckets and exits. # ! # This function enters a display loop, repeatedly displaying the custom page until the "leave" # function (CBP_HandleUserInput) indicates that the user has selected enough buckets. #---------------------------------------------------------------------------------------------- --- 903,909 ---- # has been entered to create a new bucket and no buckets have been marked for deletion, it is # assumed that the user is happy with the current list therefore if at least two buckets are ! # in the list, the 'leave' function creates those buckets and then this function exits. # ! # This function enters a display loop, repeatedly displaying the custom page until the 'leave' # function (CBP_HandleUserInput) indicates that the user has selected enough buckets. #---------------------------------------------------------------------------------------------- *************** *** 897,903 **** # CBP_C_CREATE_BN - field number of the "Create Bucket" combobox # CBP_C_DEFAULT_BUCKETS - defines the default bucket selection # CBP_C_FIRST_BN_CBOX_MINUS_ONE - used when determining how many "remove" boxes to show - # CBP_C_LAST_BN_CBOX_PLUS_ONE - used when clearing all of the "Remove" ticks # CBP_C_INIFILE - name of the INI file used to create the custom page # CBP_C_MAX_BNCOUNT - maximum number of buckets installer can handle # CBP_C_MESSAGE - field number for the progress report message --- 923,930 ---- # CBP_C_CREATE_BN - field number of the "Create Bucket" combobox # CBP_C_DEFAULT_BUCKETS - defines the default bucket selection + # CBP_C_FIRST_BN_CBOX - field holding the first "Remove" check box # CBP_C_FIRST_BN_CBOX_MINUS_ONE - used when determining how many "remove" boxes to show # CBP_C_INIFILE - name of the INI file used to create the custom page + # CBP_MAX_BN_CBOX_PLUS_ONE - used in loop which clears the ticks in the 'Remove' boxes # CBP_C_MAX_BNCOUNT - maximum number of buckets installer can handle # CBP_C_MESSAGE - field number for the progress report message *************** *** 922,926 **** ; of CBP_CreateBucketsPage so they share the same registers. To simplify maintenance, a pair ; of macros are used to specify the shared registers. ! !macro CBP_HUI_SharedDefs !define CBP_L_COUNT $R9 ; counts number of buckets selected --- 949,953 ---- ; of CBP_CreateBucketsPage so they share the same registers. To simplify maintenance, a pair ; of macros are used to specify the shared registers. ! !macro CBP_HUI_SharedDefs !define CBP_L_COUNT $R9 ; counts number of buckets selected *************** *** 942,946 **** !undef CBP_L_TEMP !macroend ! !insertmacro CBP_HUI_SharedDefs --- 969,973 ---- !undef CBP_L_TEMP !macroend ! !insertmacro CBP_HUI_SharedDefs *************** *** 978,982 **** Pop ${CBP_L_COUNT} ! get_more_input: ; Update the status message under the list of bucket names --- 1005,1010 ---- Pop ${CBP_L_COUNT} ! input_loop: ! ; Update the status message under the list of bucket names *************** *** 1008,1012 **** !insertmacro MUI_INSTALLOPTIONS_WRITE "${CBP_C_INIFILE}" "Field ${CBP_C_CREATE_BN}" "State" "" ! ; Ensure no buckets are marked for deletion --- 1036,1040 ---- !insertmacro MUI_INSTALLOPTIONS_WRITE "${CBP_C_INIFILE}" "Field ${CBP_C_CREATE_BN}" "State" "" ! ; Ensure no buckets are marked for deletion *************** *** 1017,1021 **** "Field ${CBP_L_PTR}" "State" "0" IntOp ${CBP_L_PTR} ${CBP_L_PTR} + 1 ! IntCmp ${CBP_L_PTR} ${CBP_C_LAST_BN_CBOX_PLUS_ONE} clear_finished Goto clear_loop --- 1045,1049 ---- "Field ${CBP_L_PTR}" "State" "0" IntOp ${CBP_L_PTR} ${CBP_L_PTR} + 1 ! IntCmp ${CBP_L_PTR} ${CBP_MAX_BN_CBOX_PLUS_ONE} clear_finished Goto clear_loop *************** *** 1031,1038 **** Call CBP_UpdateAddBucketList ! ; Display the "Bucket Selection Page" and wait for user to enter data and click "Continue" !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${CBP_C_INIFILE}" ! StrCmp ${CBP_L_RESULT} "wait" get_more_input finished_now: --- 1059,1067 ---- Call CBP_UpdateAddBucketList ! ; Display the "Bucket Selection Page" and wait for user to enter data and click "Continue". ! ; The 'leave' function (CBP_HandleUserInput) updates ${CBP_L_RESULT} after checking user input !insertmacro MUI_INSTALLOPTIONS_DISPLAY "${CBP_C_INIFILE}" ! StrCmp ${CBP_L_RESULT} "wait" input_loop finished_now: *************** *** 1086,1090 **** # CBP_C_FIRST_BN_CBOX - field holding the first "Remove" check box # CBP_C_FIRST_BN_TEXT - field number of first entry in list of names - # CBP_C_FIRST_BN_CBOX_MINUS_ONE - used when determining how many "remove" boxes to show # CBP_C_INIFILE - name of the INI file used to create the custom page # CBP_C_MAX_BNCOUNT - maximum number of buckets installer can handle --- 1115,1118 ---- *************** *** 1128,1139 **** ; Work through the current entries in the bucket list, removing any entries for which the ! ; "Remove" checkbox has been ticked (and clearing the tick). The end result will be a list ! ; of bucket names without any gaps in the list. If all names are removed then an empty list ! ; will be shown. pd_loop: - !insertmacro MUI_INSTALLOPTIONS_WRITE "${CBP_C_INIFILE}" "Field ${CBP_L_PTR}" "State" "0" - - pd_loop2: IntOp ${CBP_L_NAME} ${CBP_L_NAME} + 1 IntOp ${CBP_L_PTR} ${CBP_L_PTR} + 1 --- 1156,1164 ---- ; Work through the current entries in the bucket list, removing any entries for which the ! ; "Remove" checkbox has been ticked. The end result will be a list of bucket names without ! ; any gaps in the list. If all names are removed then an empty list will be shown. ! ; NB: The ticks in the 'Remove' boxes are cleared by the 'CBP_CreateBucketsPage' function. pd_loop: IntOp ${CBP_L_NAME} ${CBP_L_NAME} + 1 IntOp ${CBP_L_PTR} ${CBP_L_PTR} + 1 *************** *** 1149,1153 **** IntOp ${CBP_L_NAME} ${CBP_L_NAME} + 1 Exch ${CBP_L_NAME} ! goto pd_loop2 tidy_up: --- 1174,1178 ---- IntOp ${CBP_L_NAME} ${CBP_L_NAME} + 1 Exch ${CBP_L_NAME} ! goto pd_loop tidy_up: *************** *** 1227,1231 **** StrCpy ${CBP_L_RESULT} "wait" Return ! finished_buckets: Push ${CBP_C_FIRST_BN_TEXT} --- 1252,1256 ---- StrCpy ${CBP_L_RESULT} "wait" Return ! finished_buckets: Push ${CBP_C_FIRST_BN_TEXT} *************** *** 1466,1470 **** !define CBP_VALIDCHARS "abcdefghijklmnopqrstuvwxyz_-0123456789" ! Exch $0 ; The input string Push $1 ; Number of characters in ${CBP_VALIDCHARS} --- 1491,1495 ---- !define CBP_VALIDCHARS "abcdefghijklmnopqrstuvwxyz_-0123456789" ! Exch $0 ; The input string Push $1 ; Number of characters in ${CBP_VALIDCHARS} *************** *** 1477,1481 **** StrLen $1 "${CBP_VALIDCHARS}" StrCpy $2 "" ! next_input_char: StrCpy $3 $0 1 ; Get next character from the input string --- 1502,1506 ---- StrLen $1 "${CBP_VALIDCHARS}" StrCpy $2 "" ! next_input_char: StrCpy $3 $0 1 ; Get next character from the input string *************** *** 1484,1488 **** StrCpy $0 $0 "" 1 StrCpy $4 -1 ! next_valid_char: IntOp $4 $4 + 1 --- 1509,1513 ---- StrCpy $0 $0 "" 1 StrCpy $4 -1 ! next_valid_char: IntOp $4 $4 + 1 *************** *** 1492,1499 **** StrCpy $2 $2$5 ; Use "valid" character to ensure we store lowercase letters in the result goto next_input_char ! invalid_name: StrCpy $2 "" ! done: StrCpy $0 $2 ; Result is either a valid bucket name or "" --- 1517,1524 ---- StrCpy $2 $2$5 ; Use "valid" character to ensure we store lowercase letters in the result goto next_input_char ! invalid_name: StrCpy $2 "" ! done: StrCpy $0 $2 ; Result is either a valid bucket name or "" *************** *** 1505,1509 **** Pop $1 Exch $0 ; place result on top of the stack ! !undef CBP_VALIDCHARS --- 1530,1534 ---- Pop $1 Exch $0 ; place result on top of the stack ! !undef CBP_VALIDCHARS *************** *** 1571,1577 **** Push $1 Push $2 ! ; If the list of names starts with "|" character, ignore the "|" ! StrCpy $2 $0 1 StrCmp $2 "|" 0 start_now --- 1596,1602 ---- Push $1 Push $2 ! ; If the list of names starts with "|" character, ignore the "|" ! StrCpy $2 $0 1 StrCmp $2 "|" 0 start_now *************** *** 1924,1928 **** IntCmp $R1 0 no_trim_needed StrCpy $R0 $R0 $R1 ! no_trim_needed: Pop $R2 --- 1949,1953 ---- IntCmp $R1 0 no_trim_needed StrCpy $R0 $R0 $R1 ! no_trim_needed: Pop $R2 *************** *** 1988,1992 **** done: StrCpy $R0 $R1 ! nothing_to_do: Pop $R2 --- 2013,2017 ---- done: StrCpy $R0 $R1 ! nothing_to_do: Pop $R2 *************** *** 2037,2043 **** Push $R1 Push $R2 ! StrCpy $R1 -1 ! loop: StrCpy $R2 $R0 1 $R1 --- 2062,2068 ---- Push $R1 Push $R2 ! StrCpy $R1 -1 ! loop: StrCpy $R2 $R0 1 $R1 *************** *** 2046,2050 **** IntOp $R1 $R1 - 1 Goto loop ! exit: StrCpy $R0 $R0 $R1 --- 2071,2075 ---- IntOp $R1 $R1 - 1 Goto loop ! exit: StrCpy $R0 $R0 $R1 *************** *** 2073,2076 **** --- 2098,2102 ---- !undef CBP_C_FIRST_BN_CBOX_MINUS_ONE !undef CBP_C_FIRST_BN_TEXT + !undef CBP_C_LAST_BN_CBOX_PLUS_ONE !undef CBP_C_LAST_BN_TEXT_PLUS_ONE |