[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] qemacs cutils.h
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] qemacs cutils.h |
Date: |
Thu, 23 Jan 2014 12:43:40 +0000 |
CVSROOT: /sources/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 14/01/23 12:43:40
Modified files:
. : cutils.h
Log message:
prevent spurious uses of strncpy/strtok
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/cutils.h?cvsroot=qemacs&r1=1.14&r2=1.15
Patches:
Index: cutils.h
===================================================================
RCS file: /sources/qemacs/qemacs/cutils.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- cutils.h 3 Dec 2013 17:31:49 -0000 1.14
+++ cutils.h 23 Jan 2014 12:43:40 -0000 1.15
@@ -1,7 +1,8 @@
/*
* Various simple C utilities
*
- * Copyright (c) 2000, 2001, 2002 Fabrice Bellard.
+ * Copyright (c) 2000-2002 Fabrice Bellard.
+ * Copyright (c) 2000-2014 Charlie Gordon.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -30,6 +31,11 @@
#define pstrcat(buf, sz, str) qe_pstrcat(buf, sz, str)
#define pstrncpy(buf, sz, str, n) qe_pstrncpy(buf, sz, str, n)
+#undef strncpy
+#define strncpy(d,s) do_not_use_strncpy!!(d,s)
+#undef strtok
+#define strtok(str,sep) do_not_use_strtok!!(str,sep)
+
int strstart(const char *str, const char *val, const char **ptr);
char *pstrcpy(char *buf, int buf_size, const char *str);
char *pstrcat(char *buf, int buf_size, const char *s);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemacs-commit] qemacs cutils.h,
Charlie Gordon <=