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.
This commit is contained in:
+1
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user