From 6f5ef761dff56f6fad015e13d16d1ec12283a25c Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Sun, 28 May 2000 21:22:12 +0000 Subject: toplev.h (skip_leading_substring): New macro. 2000-05-28 Gabriel Dos Reis * toplev.h (skip_leading_substring): New macro. * toplev.c (decode_f_option): Use skip_leading_substring instead of strncmp. (decode_W_option): Likewise. cp/ 2000-05-28 Gabriel Dos Reis * decl2.c (lang_decode_option): Use skip_leading_substring instead of plain strncmp. From-SVN: r34240 --- gcc/toplev.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/toplev.h') diff --git a/gcc/toplev.h b/gcc/toplev.h index 9f7ed84..fdfee43 100644 --- a/gcc/toplev.h +++ b/gcc/toplev.h @@ -26,6 +26,11 @@ union tree_node; struct rtx_def; #endif +/* If non-NULL, return one past-the-end of the matching SUBPART of + the WHOLE string. */ +#define skip_leading_substring(whole, part) \ + (strncmp (whole, part, strlen (part)) ? NULL : whole + strlen (part)) + extern int read_integral_parameter PARAMS ((const char *, const char *, const int)); extern int count_error PARAMS ((int)); -- cgit v1.1