summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-14 07:29:16 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-14 07:29:16 -0800
commit4088b1e622cff0673f2859de5ee611da736bdba7 (patch)
tree7049a500c42efee0071b9838a08e5a84478e7ea3 /src/main.c
parentab3bdfb2cb7b0c16800195951e4ee549cf8e86a5 (diff)
downloadopenocd+libswd-4088b1e622cff0673f2859de5ee611da736bdba7.tar.gz
openocd+libswd-4088b1e622cff0673f2859de5ee611da736bdba7.tar.bz2
openocd+libswd-4088b1e622cff0673f2859de5ee611da736bdba7.tar.xz
openocd+libswd-4088b1e622cff0673f2859de5ee611da736bdba7.zip
add openocd.h for top-level declarations
Create src/openocd.h to hold declarations previously made internally by src/main.c and src/server/server.c. This ensures all functions are verified to be in-sync at compile time (rather than at link), making it easier to track down bugs.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index c2b53da6..a71977da 100644
--- a/src/main.c
+++ b/src/main.c
@@ -22,6 +22,7 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#include "openocd.h"
/* This is the main entry for developer PC hosted OpenOCD.
*
@@ -32,8 +33,6 @@
* Those applications will have their own main() implementation
* and use bits and pieces from openocd.c. */
-extern int openocd_main(int argc, char *argv[]);
-
int main(int argc, char *argv[])
{
return openocd_main(argc, argv);