Use PATH_MAX instead of a hard-coded 256 path limit.
[claws.git] / src / quote_fmt_parse.y
index 92e300e03b977ed033255726a6c2903bd8af12e0..fbc4fc38a7a7a3bc9db58d311bf656757c6c2b8f 100644 (file)
@@ -37,6 +37,7 @@
 #include "quote_fmt.h"
 #include "quote_fmt_lex.h"
 #include "account.h"
+#include "file-utils.h"
 
 /* decl */
 /*
@@ -487,11 +488,11 @@ static void quote_fmt_show_msg(MsgInfo *msginfo, const gchar *body,
        if (fp == NULL)
                g_warning("Can't get text part");
        else {
-               account_signatures_matchlist_create();
+               account_sigsep_matchlist_create();
                while (fgets(buf, sizeof(buf), fp) != NULL) {
                        strcrchomp(buf);
 
-                       if (!signature && account_signatures_matchlist_nchar_found(buf, "%s\n"))
+                       if (!signature && account_sigsep_matchlist_nchar_found(buf, "%s\n"))
                                break;
                
                        if (quoted && quote_str)
@@ -499,7 +500,7 @@ static void quote_fmt_show_msg(MsgInfo *msginfo, const gchar *body,
                        
                        INSERT(buf);
                }
-               account_signatures_matchlist_delete();
+               account_sigsep_matchlist_delete();
                fclose(fp);
        }
 }
@@ -507,7 +508,7 @@ static void quote_fmt_show_msg(MsgInfo *msginfo, const gchar *body,
 static void quote_fmt_insert_file(const gchar *filename)
 {
        FILE *file;
-       char buffer[256];
+       char buffer[PATH_MAX];
        
        if ((file = g_fopen(filename, "rb")) != NULL) {
                while (fgets(buffer, sizeof(buffer), file)) {
@@ -521,7 +522,7 @@ static void quote_fmt_insert_file(const gchar *filename)
 static void quote_fmt_insert_program_output(const gchar *progname)
 {
        FILE *file;
-       char buffer[256];
+       char buffer[PATH_MAX];
 
        if ((file = popen(progname, "r")) != NULL) {
                while (fgets(buffer, sizeof(buffer), file)) {