Skip to content

Commit

Permalink
add a simple g_strlcat define in strutil for gtk==1 where this symbo…
Browse files Browse the repository at this point in the history
…l does not exist

svn path=/trunk/; revision=16511
  • Loading branch information
Ronnie Sahlberg committed Nov 16, 2005
1 parent 6c466a1 commit 898dc49
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 4 deletions.
1 change: 1 addition & 0 deletions asn1/x411/packet-x411-template.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

#include "packet-x411.h"
#include <epan/emem.h>
#include <epan/strutil.h>

#define PNAME "X.411 Message Transfer Service"
#define PSNAME "X411"
Expand Down
1 change: 1 addition & 0 deletions asn1/x509if/packet-x509if-template.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "packet-x509if.h"
#include "packet-ber.h"
#include "packet-x509sat.h"
#include <epan/strutil.h>

#define PNAME "X.509 Information Framework"
#define PSNAME "X509IF"
Expand Down
3 changes: 2 additions & 1 deletion epan/dissectors/packet-x411.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
/* .\packet-x411.c */
/* ./packet-x411.c */
/* ../../tools/asn2eth.py -X -b -e -p x411 -c x411.cnf -s packet-x411-template x411.asn */

/* Input file: packet-x411-template.c */
Expand Down Expand Up @@ -53,6 +53,7 @@

#include "packet-x411.h"
#include <epan/emem.h>
#include <epan/strutil.h>

#define PNAME "X.411 Message Transfer Service"
#define PSNAME "X411"
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-x411.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
/* .\packet-x411.h */
/* ./packet-x411.h */
/* ../../tools/asn2eth.py -X -b -e -p x411 -c x411.cnf -s packet-x411-template x411.asn */

/* Input file: packet-x411-template.h */
Expand Down
3 changes: 2 additions & 1 deletion epan/dissectors/packet-x509if.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
/* .\packet-x509if.c */
/* ./packet-x509if.c */
/* ../../tools/asn2eth.py -X -b -e -p x509if -c x509if.cnf -s packet-x509if-template InformationFramework.asn */

/* Input file: packet-x509if-template.c */
Expand Down Expand Up @@ -44,6 +44,7 @@
#include "packet-x509if.h"
#include "packet-ber.h"
#include "packet-x509sat.h"
#include <epan/strutil.h>

#define PNAME "X.509 Information Framework"
#define PSNAME "X509IF"
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-x509if.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler */
/* .\packet-x509if.h */
/* ./packet-x509if.h */
/* ../../tools/asn2eth.py -X -b -e -p x509if -c x509if.cnf -s packet-x509if-template InformationFramework.asn */

/* Input file: packet-x509if-template.h */
Expand Down
12 changes: 12 additions & 0 deletions epan/strutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,16 @@ guint8 * convert_string_to_hex(const char *string, size_t *nbytes);
*/
char * convert_string_case(const char *string, gboolean case_insensitive);

/* g_strlcat() does not exist in gtk 1 */
#if GTK_MAJOR_VERSION < 2
#define g_strlcat(dst, src, size) \
{ \
int strl; \
strl=strlen(dst); \
if(strl<size) \
g_snprintf(dst+strl, size-strl, "%s", src); \
dst[size-1]=0; \
}
#endif

#endif /* __STRUTIL_H__ */

0 comments on commit 898dc49

Please sign in to comment.