forked from osmocom/wireshark
Revert 43481: linking dftest against libui was not the problem.
svn path=/trunk/; revision=43488
This commit is contained in:
parent
efbde1c75a
commit
9e1359e2fa
|
@ -441,6 +441,7 @@ randpkt_CFLAGS = $(AM_CLEAN_CFLAGS)
|
|||
|
||||
# Libraries and plugin flags with which to link dftest.
|
||||
dftest_LDADD = \
|
||||
ui/libui.a \
|
||||
wiretap/libwiretap.la \
|
||||
wsutil/libwsutil.la \
|
||||
epan/libwireshark.la \
|
||||
|
|
|
@ -358,7 +358,7 @@ text2pcap.exe : $(LIBS_CHECK) config.h text2pcap.obj text2pcap-scanner.obj wsuti
|
|||
dftest.exe : $(dftest_OBJECTS) epan ui
|
||||
@echo Linking $@
|
||||
$(LINK) @<<
|
||||
/OUT:dftest.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dftest_LIBS) $(dftest_OBJECTS)
|
||||
/OUT:dftest.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dftest_LIBS) ui\libui.lib $(dftest_OBJECTS)
|
||||
<<
|
||||
!IFDEF MANIFEST_INFO_REQUIRED
|
||||
mt.exe -nologo -manifest "dftest.exe.manifest" -outputresource:dftest.exe;1
|
||||
|
|
39
ui/util.c
39
ui/util.c
|
@ -47,6 +47,45 @@
|
|||
|
||||
#include "ui/util.h"
|
||||
|
||||
/*
|
||||
* Collect command-line arguments as a string consisting of the arguments,
|
||||
* separated by spaces.
|
||||
*/
|
||||
char *
|
||||
get_args_as_string(int argc, char **argv, int optindex)
|
||||
{
|
||||
int len;
|
||||
int i;
|
||||
char *argstring;
|
||||
|
||||
/*
|
||||
* Find out how long the string will be.
|
||||
*/
|
||||
len = 0;
|
||||
for (i = optindex; i < argc; i++) {
|
||||
len += (int) strlen(argv[i]);
|
||||
len++; /* space, or '\0' if this is the last argument */
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate the buffer for the string.
|
||||
*/
|
||||
argstring = (char *)g_malloc(len);
|
||||
|
||||
/*
|
||||
* Now construct the string.
|
||||
*/
|
||||
argstring[0] = '\0';
|
||||
i = optindex;
|
||||
for (;;) {
|
||||
g_strlcat(argstring, argv[i], len);
|
||||
i++;
|
||||
if (i == argc)
|
||||
break;
|
||||
g_strlcat(argstring, " ", len);
|
||||
}
|
||||
return argstring;
|
||||
}
|
||||
|
||||
/* Compute the difference between two seconds/microseconds time stamps. */
|
||||
void
|
||||
|
|
|
@ -91,7 +91,6 @@ ascii_strdown_inplace
|
|||
ascii_strup_inplace
|
||||
isprint_string
|
||||
isdigit_string
|
||||
get_args_as_string
|
||||
|
||||
; type_util.c
|
||||
type_util_gdouble_to_guint64
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
#include <string.h>
|
||||
#include "str_util.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
@ -91,44 +90,3 @@ isdigit_string(guchar *str)
|
|||
/* The string contains only digits */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Collect command-line arguments as a string consisting of the arguments,
|
||||
* separated by spaces.
|
||||
*/
|
||||
char *
|
||||
get_args_as_string(int argc, char **argv, int optindex)
|
||||
{
|
||||
int len;
|
||||
int i;
|
||||
char *argstring;
|
||||
|
||||
/*
|
||||
* Find out how long the string will be.
|
||||
*/
|
||||
len = 0;
|
||||
for (i = optindex; i < argc; i++) {
|
||||
len += (int) strlen(argv[i]);
|
||||
len++; /* space, or '\0' if this is the last argument */
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate the buffer for the string.
|
||||
*/
|
||||
argstring = (char *)g_malloc(len);
|
||||
|
||||
/*
|
||||
* Now construct the string.
|
||||
*/
|
||||
argstring[0] = '\0';
|
||||
i = optindex;
|
||||
for (;;) {
|
||||
g_strlcat(argstring, argv[i], len);
|
||||
i++;
|
||||
if (i == argc)
|
||||
break;
|
||||
g_strlcat(argstring, " ", len);
|
||||
}
|
||||
return argstring;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue