Merged revisions 49237 via svnmerge from
authorSteve Murphy <murf@digium.com>
Tue, 2 Jan 2007 22:43:36 +0000 (22:43 +0000)
committerSteve Murphy <murf@digium.com>
Tue, 2 Jan 2007 22:43:36 +0000 (22:43 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49237 | murf | 2007-01-02 15:30:53 -0700 (Tue, 02 Jan 2007) | 1 line

This is a slight modification to Josh's edits for #8579; both files edited were the produced by flex; so the source files need to be changed instead, and the generated files regenerated.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49238 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/ast_expr2.fl
main/ast_expr2f.c
pbx/ael/ael.flex
pbx/ael/ael_lex.c

index 58c5228..8f156e8 100644 (file)
@@ -241,11 +241,11 @@ int ast_expr(char *expr, char *buf, int length)
                        res_length = snprintf(buf, length, "%ld", (long int) io.val->u.i);
                        return_value = (res_length <= length) ? res_length : length;
                } else {
-#ifdef STANDALONE
+#if defined(STANDALONE) || defined(LOW_MEMORY)
                        strncpy(buf, io.val->u.s, length - 1);
-#else /* !STANDALONE */
+#else /* !STANDALONE && !LOW_MEMORY */
                        ast_copy_string(buf, io.val->u.s, length);
-#endif /* STANDALONE */
+#endif /* STANDALONE || LOW_MEMORY */
                        return_value = strlen(buf);
                        free(io.val->u.s);
                }
index 3fec4a2..b0e6945 100644 (file)
@@ -3122,11 +3122,11 @@ int ast_expr(char *expr, char *buf, int length)
                        res_length = snprintf(buf, length, "%ld", (long int) io.val->u.i);
                        return_value = (res_length <= length) ? res_length : length;
                } else {
-#ifdef STANDALONE
+#if defined(STANDALONE) || defined(LOW_MEMORY)
                        strncpy(buf, io.val->u.s, length - 1);
-#else /* !STANDALONE */
+#else /* !STANDALONE && !LOW_MEMORY */
                        ast_copy_string(buf, io.val->u.s, length);
-#endif /* STANDALONE */
+#endif /* STANDALONE || LOW_MEMORY */
                        return_value = strlen(buf);
                        free(io.val->u.s);
                }
index 1c4722e..41f2460 100644 (file)
@@ -411,7 +411,7 @@ includes    { STORE_POS; return KW_INCLUDES;}
                        if (*(p1+1) != '/')
                                snprintf(fnamebuf, sizeof(fnamebuf), "%s/%s", ast_config_AST_CONFIG_DIR, p1 + 1);
                        else
-#ifdef STANDALONE
+#if defined(STANDALONE) || defined(LOW_MEMORY)
                                strncpy(fnamebuf, p1 + 1, sizeof(fnamebuf) - 1);
 #else
                                ast_copy_string(fnamebuf, p1 + 1, sizeof(fnamebuf));
index daddeb1..91cc3e7 100644 (file)
@@ -1683,7 +1683,7 @@ YY_RULE_SETUP
                        if (*(p1+1) != '/')
                                snprintf(fnamebuf, sizeof(fnamebuf), "%s/%s", ast_config_AST_CONFIG_DIR, p1 + 1);
                        else
-#ifdef STANDALONE
+#if defined(STANDALONE) || defined(LOW_MEMORY)
                                strncpy(fnamebuf, p1 + 1, sizeof(fnamebuf) - 1);
 #else
                                ast_copy_string(fnamebuf, p1 + 1, sizeof(fnamebuf));