Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167133574
D36364.id109882.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
748 B
Referenced Files
None
Subscribers
None
D36364.id109882.diff
View Options
diff --git a/stand/common/bootstrap.h b/stand/common/bootstrap.h
--- a/stand/common/bootstrap.h
+++ b/stand/common/bootstrap.h
@@ -52,6 +52,7 @@
void interact(void);
void interp_emit_prompt(void);
int interp_builtin_cmd(int argc, char *argv[]);
+bool interp_has_builtin_cmd(const char *cmd);
/* Called by interp.c for interp_*.c embedded interpreters */
int interp_include(const char *); /* Execute commands from filename */
diff --git a/stand/common/interp.c b/stand/common/interp.c
--- a/stand/common/interp.c
+++ b/stand/common/interp.c
@@ -190,3 +190,12 @@
}
return (result);
}
+
+/*
+ * Return true if the builtin command exists
+ */
+bool
+interp_has_builtin_cmd(const char *cmd)
+{
+ return (interp_lookup_cmd(cmd) != NULL);
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Aug 20, 9:09 AM (5 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36978357
Default Alt Text
D36364.id109882.diff (748 B)
Attached To
Mode
D36364: stand: Add interp_has_builtin_cmd to see if we have a command
Attached
Detach File
Event Timeline
Log In to Comment