Fossil SCM
Redo TIP #440 alternative - again - now using the "info runtime" command.
Commit
9633f6ac947119b165a0754e6e497a4c9e80bcbc
Parent
12cf825f663e49a…
2 files changed
+16
+16
+16
| --- src/th_lang.c | ||
| +++ src/th_lang.c | ||
| @@ -947,10 +947,25 @@ | ||
| 947 | 947 | return TH_OK; |
| 948 | 948 | } |
| 949 | 949 | |
| 950 | 950 | /* |
| 951 | 951 | ** TH Syntax: |
| 952 | +** | |
| 953 | +** info runtime | |
| 954 | +*/ | |
| 955 | +static int info_runtime_command( | |
| 956 | + Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl | |
| 957 | +){ | |
| 958 | + if( argc!=2 ){ | |
| 959 | + return Th_WrongNumArgs(interp, "info runtime"); | |
| 960 | + } | |
| 961 | + Th_SetResult(interp, "TH1", -1); | |
| 962 | + return TH_OK; | |
| 963 | +} | |
| 964 | + | |
| 965 | +/* | |
| 966 | +** TH Syntax: | |
| 952 | 967 | ** |
| 953 | 968 | ** info vars |
| 954 | 969 | */ |
| 955 | 970 | static int info_vars_command( |
| 956 | 971 | Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl |
| @@ -1105,10 +1120,11 @@ | ||
| 1105 | 1120 | int *argl |
| 1106 | 1121 | ){ |
| 1107 | 1122 | static const Th_SubCommand aSub[] = { |
| 1108 | 1123 | { "commands", info_commands_command }, |
| 1109 | 1124 | { "exists", info_exists_command }, |
| 1125 | + { "runtime", info_runtime_command }, | |
| 1110 | 1126 | { "vars", info_vars_command }, |
| 1111 | 1127 | { 0, 0 } |
| 1112 | 1128 | }; |
| 1113 | 1129 | return Th_CallSubCommand(interp, ctx, argc, argv, argl, aSub); |
| 1114 | 1130 | } |
| 1115 | 1131 |
| --- src/th_lang.c | |
| +++ src/th_lang.c | |
| @@ -947,10 +947,25 @@ | |
| 947 | return TH_OK; |
| 948 | } |
| 949 | |
| 950 | /* |
| 951 | ** TH Syntax: |
| 952 | ** |
| 953 | ** info vars |
| 954 | */ |
| 955 | static int info_vars_command( |
| 956 | Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl |
| @@ -1105,10 +1120,11 @@ | |
| 1105 | int *argl |
| 1106 | ){ |
| 1107 | static const Th_SubCommand aSub[] = { |
| 1108 | { "commands", info_commands_command }, |
| 1109 | { "exists", info_exists_command }, |
| 1110 | { "vars", info_vars_command }, |
| 1111 | { 0, 0 } |
| 1112 | }; |
| 1113 | return Th_CallSubCommand(interp, ctx, argc, argv, argl, aSub); |
| 1114 | } |
| 1115 |
| --- src/th_lang.c | |
| +++ src/th_lang.c | |
| @@ -947,10 +947,25 @@ | |
| 947 | return TH_OK; |
| 948 | } |
| 949 | |
| 950 | /* |
| 951 | ** TH Syntax: |
| 952 | ** |
| 953 | ** info runtime |
| 954 | */ |
| 955 | static int info_runtime_command( |
| 956 | Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl |
| 957 | ){ |
| 958 | if( argc!=2 ){ |
| 959 | return Th_WrongNumArgs(interp, "info runtime"); |
| 960 | } |
| 961 | Th_SetResult(interp, "TH1", -1); |
| 962 | return TH_OK; |
| 963 | } |
| 964 | |
| 965 | /* |
| 966 | ** TH Syntax: |
| 967 | ** |
| 968 | ** info vars |
| 969 | */ |
| 970 | static int info_vars_command( |
| 971 | Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl |
| @@ -1105,10 +1120,11 @@ | |
| 1120 | int *argl |
| 1121 | ){ |
| 1122 | static const Th_SubCommand aSub[] = { |
| 1123 | { "commands", info_commands_command }, |
| 1124 | { "exists", info_exists_command }, |
| 1125 | { "runtime", info_runtime_command }, |
| 1126 | { "vars", info_vars_command }, |
| 1127 | { 0, 0 } |
| 1128 | }; |
| 1129 | return Th_CallSubCommand(interp, ctx, argc, argv, argl, aSub); |
| 1130 | } |
| 1131 |
+16
| --- src/th_lang.c | ||
| +++ src/th_lang.c | ||
| @@ -947,10 +947,25 @@ | ||
| 947 | 947 | return TH_OK; |
| 948 | 948 | } |
| 949 | 949 | |
| 950 | 950 | /* |
| 951 | 951 | ** TH Syntax: |
| 952 | +** | |
| 953 | +** info runtime | |
| 954 | +*/ | |
| 955 | +static int info_runtime_command( | |
| 956 | + Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl | |
| 957 | +){ | |
| 958 | + if( argc!=2 ){ | |
| 959 | + return Th_WrongNumArgs(interp, "info runtime"); | |
| 960 | + } | |
| 961 | + Th_SetResult(interp, "TH1", -1); | |
| 962 | + return TH_OK; | |
| 963 | +} | |
| 964 | + | |
| 965 | +/* | |
| 966 | +** TH Syntax: | |
| 952 | 967 | ** |
| 953 | 968 | ** info vars |
| 954 | 969 | */ |
| 955 | 970 | static int info_vars_command( |
| 956 | 971 | Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl |
| @@ -1105,10 +1120,11 @@ | ||
| 1105 | 1120 | int *argl |
| 1106 | 1121 | ){ |
| 1107 | 1122 | static const Th_SubCommand aSub[] = { |
| 1108 | 1123 | { "commands", info_commands_command }, |
| 1109 | 1124 | { "exists", info_exists_command }, |
| 1125 | + { "runtime", info_runtime_command }, | |
| 1110 | 1126 | { "vars", info_vars_command }, |
| 1111 | 1127 | { 0, 0 } |
| 1112 | 1128 | }; |
| 1113 | 1129 | return Th_CallSubCommand(interp, ctx, argc, argv, argl, aSub); |
| 1114 | 1130 | } |
| 1115 | 1131 |
| --- src/th_lang.c | |
| +++ src/th_lang.c | |
| @@ -947,10 +947,25 @@ | |
| 947 | return TH_OK; |
| 948 | } |
| 949 | |
| 950 | /* |
| 951 | ** TH Syntax: |
| 952 | ** |
| 953 | ** info vars |
| 954 | */ |
| 955 | static int info_vars_command( |
| 956 | Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl |
| @@ -1105,10 +1120,11 @@ | |
| 1105 | int *argl |
| 1106 | ){ |
| 1107 | static const Th_SubCommand aSub[] = { |
| 1108 | { "commands", info_commands_command }, |
| 1109 | { "exists", info_exists_command }, |
| 1110 | { "vars", info_vars_command }, |
| 1111 | { 0, 0 } |
| 1112 | }; |
| 1113 | return Th_CallSubCommand(interp, ctx, argc, argv, argl, aSub); |
| 1114 | } |
| 1115 |
| --- src/th_lang.c | |
| +++ src/th_lang.c | |
| @@ -947,10 +947,25 @@ | |
| 947 | return TH_OK; |
| 948 | } |
| 949 | |
| 950 | /* |
| 951 | ** TH Syntax: |
| 952 | ** |
| 953 | ** info runtime |
| 954 | */ |
| 955 | static int info_runtime_command( |
| 956 | Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl |
| 957 | ){ |
| 958 | if( argc!=2 ){ |
| 959 | return Th_WrongNumArgs(interp, "info runtime"); |
| 960 | } |
| 961 | Th_SetResult(interp, "TH1", -1); |
| 962 | return TH_OK; |
| 963 | } |
| 964 | |
| 965 | /* |
| 966 | ** TH Syntax: |
| 967 | ** |
| 968 | ** info vars |
| 969 | */ |
| 970 | static int info_vars_command( |
| 971 | Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl |
| @@ -1105,10 +1120,11 @@ | |
| 1120 | int *argl |
| 1121 | ){ |
| 1122 | static const Th_SubCommand aSub[] = { |
| 1123 | { "commands", info_commands_command }, |
| 1124 | { "exists", info_exists_command }, |
| 1125 | { "runtime", info_runtime_command }, |
| 1126 | { "vars", info_vars_command }, |
| 1127 | { 0, 0 } |
| 1128 | }; |
| 1129 | return Th_CallSubCommand(interp, ctx, argc, argv, argl, aSub); |
| 1130 | } |
| 1131 |