@@ -892,11 +892,10 @@ Function KillStorage()
892
892
killGlobalvar ( "parsingTime" )
893
893
End
894
894
895
- // Returns a list with the following optional suffixes removed:
896
- // -Module " [.*]"
897
- // -Ending ".ipf"
898
- // -Both ".ipf [.*]"
899
- Function /S nicifyProcedureList ( list)
895
+ /// @brief Return a list of procedures with the module suffix " [.*]" removed
896
+ //
897
+ /// @see ProcedureListRemoveEnding
898
+ Function /S ProcedureListRemoveModule ( list)
900
899
string list
901
900
902
901
variable i , idx
@@ -905,6 +904,23 @@ Function/S nicifyProcedureList(list)
905
904
for ( i = 0; i < ItemsInList ( list) ; i += 1 )
906
905
item = StringFromList ( i , list)
907
906
item = RemoveEverythingAfter ( item, " [" )
907
+ niceList = AddListItem ( item, niceList, ";" , inf )
908
+ endfor
909
+
910
+ return niceList
911
+ End
912
+
913
+ /// @brief Return a list of procedures with the ending ".ipf" removed
914
+ //
915
+ /// @see ProcedureListRemoveModule
916
+ Function /S ProcedureListRemoveEnding ( list)
917
+ string list
918
+
919
+ variable i , idx
920
+ string item, niceList= ""
921
+
922
+ for ( i = 0; i < ItemsInList ( list) ; i += 1 )
923
+ item = StringFromList ( i , list)
908
924
item = RemoveEverythingAfter ( item, ".ipf" )
909
925
niceList = AddListItem ( item, niceList, ";" , inf )
910
926
endfor
@@ -1189,15 +1205,32 @@ static Function/Wave getSaveVariables()
1189
1205
return wv
1190
1206
End
1191
1207
1192
- // Returns a list of all procedure files of the given independent module/ProcGlobal
1193
- Function /S getProcList ( module)
1194
- String module
1208
+ // Get a list of all procedure files of the given independent module/ProcGlobal
1209
+ //
1210
+ // @param module Independent Module or ProcGlobal Namespace
1211
+ // @param addModule [optional, default 0] add the module to the list
1212
+ // Module is added as Module#Procedure in a way similar to Module#Function()
1213
+ Function /S getProcList ( module, [ addModule] )
1214
+ string module
1215
+ variable addModule
1216
+
1217
+ string procedures
1218
+
1219
+ addModule = ParamIsDefault ( addModule) ? 0 : !! addModule
1195
1220
1196
- if ( isProcGlobal ( module) )
1197
- return getGlobalProcWindows ()
1221
+ if ( isProcGlobal ( module))
1222
+ module = "ProcGlobal"
1223
+ procedures = getGlobalProcWindows ()
1198
1224
else
1199
- return getIMProcWindows ( module)
1225
+ procedures = getIMProcWindows ( module)
1226
+ endif
1227
+
1228
+ if ( addModule)
1229
+ procedures = ProcedureListRemoveEnding ( procedures)
1230
+ module = module + "#"
1231
+ procedures = AddToItemsInList ( procedures, prefix= module)
1200
1232
endif
1233
+ return procedures
1201
1234
End
1202
1235
1203
1236
static Function getParsingTime ()
0 commit comments