Revision: 77172
          http://sourceforge.net/p/brlcad/code/77172
Author:   starseeker
Date:     2020-09-17 19:53:56 +0000 (Thu, 17 Sep 2020)
Log Message:
-----------
These probably belong in ged/commands.h

Modified Paths:
--------------
    brlcad/trunk/include/ged/commands.h
    brlcad/trunk/include/ged/defines.h

Modified: brlcad/trunk/include/ged/commands.h
===================================================================
--- brlcad/trunk/include/ged/commands.h 2020-09-17 19:43:34 UTC (rev 77171)
+++ brlcad/trunk/include/ged/commands.h 2020-09-17 19:53:56 UTC (rev 77172)
@@ -41,6 +41,32 @@
 GED_EXPORT extern int ged_exec(struct ged *gedp, int argc, const char *argv[]);
 /** @} */
 
+/* LIBGED maintains this list - callers should regard it as read only.  This
+ * list will change (size and pointers to individual command strings if
+ * commands are added or removed - caller is responsible for performing a new
+ * call to get an updated list and size if commands are altered.  */
+GED_EXPORT size_t ged_cmd_list(const char * const **cmd_list);
+
+/* Report whether a string identifies a valid LIBGED command.  If func is
+ * non-NULL, check that cmd and func both refer to the same function pointer
+ * (i.e., they are aliases for the same command.)
+ *
+ * If func is NULL, a 0 return indicates an valid GED command and non-zero
+ * indicates a valid command.
+ *
+ * If func is non-null:
+ * 0 indicates both cmd and func strings invoke the same LIBGED function
+ * 1 indicates that either or both of cmd and func were invalid GED commands
+ * 2 indicates that both were valid commands, but they did not match.
+ */
+GED_EXPORT int ged_cmd_valid(const char *cmd, const char *func);
+
+/* Given a candidate cmd name, find the closest match to it among defined
+ * GED commands.  Returns the bu_editdist distance between cmd and *ncmd
+ * (0 if they match exactly - i.e. cmd does define a command.)
+ *
+ * Useful for suggesting corrections to commands which are not found.
+ */
 GED_EXPORT extern int
 ged_cmd_lookup(const char **ncmd, const char *cmd);
 

Modified: brlcad/trunk/include/ged/defines.h
===================================================================
--- brlcad/trunk/include/ged/defines.h  2020-09-17 19:43:34 UTC (rev 77171)
+++ brlcad/trunk/include/ged/defines.h  2020-09-17 19:53:56 UTC (rev 77172)
@@ -337,27 +337,7 @@
  * Can be important when diagnosing command errors. */
 GED_EXPORT const char * ged_init_msgs();
 
-/* LIBGED maintains this list - callers should regard it as read only.  This
- * list will change (size and pointers to individual command strings if
- * commands are added or removed - caller is responsible for performing a new
- * call to get an updated list and size if commands are altered.  */
-GED_EXPORT size_t ged_cmd_list(const char * const **cmd_list);
 
-/* Report whether a string identifies a valid LIBGED command.  If func is
- * non-NULL, check that cmd and func both refer to the same function pointer
- * (i.e., they are aliases for the same command.)
- *
- * If func is NULL, a 0 return indicates an valid GED command and non-zero
- * indicates a valid command.
- *
- * If func is non-null:
- * 0 indicates both cmd and func strings invoke the same LIBGED function
- * 1 indicates that either or both of cmd and func were invalid GED commands
- * 2 indicates that both were valid commands, but they did not match.
- */
-GED_EXPORT int ged_cmd_valid(const char *cmd, const char *func);
-
-
 __END_DECLS
 
 #endif /* GED_DEFINES_H */

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to