Generate randpkt_core/doxygen.cfg.
[metze/wireshark/wip.git] / echld_test.c
index 0cc30b38ab5d05942d8b3e6e03710f7eace612dc..b2d192edf3dc5d4d7830ef62a3f7bd8a064fa9fd 100644 (file)
@@ -22,7 +22,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include "config.h"
+#include <config.h>
 
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
@@ -32,7 +32,6 @@
 # include <sys/types.h>
 #endif
 
-#include <sys/time.h>
 #include <sys/uio.h>
 
 #ifdef HAVE_UNISTD_H
@@ -317,14 +316,11 @@ cmd_t commands[] = {
 static char* help_cmd(char** params _U_, char** err _U_) {
        GString* out = g_string_new("Commands:\n");
        cmd_t* c = commands;
-       char* s;
 
        for (;c->txt;c++) {
                g_string_append_printf(out,"%s\n",c->help);
        }
-       s = out->str;
-       g_string_free(out,FALSE);
-       return s;
+       return g_string_free(out,FALSE);
 }
 
 
@@ -364,7 +360,7 @@ static int invoke_cmd(FILE* in_fp) {
 }
 
 static char* run_cmd(char** pars, char** err _U_) {
-       FILE* fp = fopen(pars[1],"r");
+       FILE* fp = ws_stdio_fopen(pars[1],"r");
        while(invoke_cmd(fp)) { ; }
        fclose(fp);
        return NULL;
@@ -411,3 +407,16 @@ int main(int argc _U_, char** argv _U_) {
        echld_terminate();
        return 0;
 }
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */