]> granicus.if.org Git - mutt/commitdiff
Rename mutt_buffer_rfc1524_expand_command()
authorKevin McCarthy <kevin@8t8.us>
Sun, 14 Apr 2019 22:38:15 +0000 (15:38 -0700)
committerKevin McCarthy <kevin@8t8.us>
Sun, 14 Apr 2019 22:38:15 +0000 (15:38 -0700)
Remove buffer prefix now that all callers are converted.

attach.c
handler.c
rfc1524.c
rfc1524.h

index b2eb7789d35ac1910164915cd551993094fd89ef..68a01d72bd00af5dfce0502daad51b2ccb86150a 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -128,8 +128,7 @@ int mutt_compose_attachment (BODY *a)
       else
        mutt_buffer_strcpy (newfile, a->filename);
 
-      if (mutt_buffer_rfc1524_expand_command (a, mutt_b2s (newfile), type,
-                                              command))
+      if (mutt_rfc1524_expand_command (a, mutt_b2s (newfile), type, command))
       {
        /* For now, editing requires a file, no piping */
        mutt_error _("Mailcap compose entry requires %%s");
@@ -264,8 +263,7 @@ int mutt_edit_attachment (BODY *a)
       else
        mutt_buffer_strcpy (newfile, a->filename);
 
-      if (mutt_buffer_rfc1524_expand_command (a, mutt_b2s (newfile), type,
-                                              command))
+      if (mutt_rfc1524_expand_command (a, mutt_b2s (newfile), type, command))
       {
        /* For now, editing requires a file, no piping */
        mutt_error _("Mailcap Edit entry requires %%s");
@@ -440,8 +438,8 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag, HEADER *hdr,
        goto return_error;
     }
 
-    use_pipe = mutt_buffer_rfc1524_expand_command (a, mutt_b2s (tempfile), type,
-                                                   command);
+    use_pipe = mutt_rfc1524_expand_command (a, mutt_b2s (tempfile), type,
+                                            command);
     use_pager = entry->copiousoutput;
   }
 
@@ -974,7 +972,7 @@ int mutt_print_attachment (FILE *fp, BODY *a)
       mutt_save_attachment (fp, a, mutt_b2s (newfile), 0, NULL);
 
     mutt_buffer_strcpy (command, entry->printcommand);
-    piped = mutt_buffer_rfc1524_expand_command (a, mutt_b2s (newfile), type, command);
+    piped = mutt_rfc1524_expand_command (a, mutt_b2s (newfile), type, command);
 
     mutt_endwin (NULL);
 
index b8ebe17543af800553f9419e8ea7e8e53957cd50..07b37685eec208420aaec67340569d28ec16971d 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -1332,7 +1332,7 @@ static int autoview_handler (BODY *a, STATE *s)
     mutt_buffer_strcpy (command, entry->command);
 
     /* rfc1524_expand_command returns 0 if the file is required */
-    piped = mutt_buffer_rfc1524_expand_command (a, mutt_b2s (tempfile), type, command);
+    piped = mutt_rfc1524_expand_command (a, mutt_b2s (tempfile), type, command);
 
     if (s->flags & MUTT_DISPLAY)
     {
index a7ae9cd2fef194962bd989e28b0a5efe5a2aefa2..9fb0733e084753c843c33688f449200f663a743e 100644 (file)
--- a/rfc1524.c
+++ b/rfc1524.c
@@ -55,8 +55,8 @@
  * In addition, this function returns a 0 if the command works on a file,
  * and 1 if the command works on a pipe.
  */
-int mutt_buffer_rfc1524_expand_command (BODY *a, const char *filename, const char *_type,
-                                        BUFFER *command)
+int mutt_rfc1524_expand_command (BODY *a, const char *filename, const char *_type,
+                                 BUFFER *command)
 {
   const char *cptr;
   int needspipe = TRUE;
@@ -328,7 +328,7 @@ static int rfc1524_mailcap_parse (BODY *a,
          {
             command = mutt_buffer_pool_get ();
             mutt_buffer_strcpy (command, test_command);
-           mutt_buffer_rfc1524_expand_command (a, a->filename, type, command);
+           mutt_rfc1524_expand_command (a, a->filename, type, command);
            if (mutt_system (mutt_b2s (command)))
            {
              /* a non-zero exit code means test failed */
index cd15e4f16ce0257912acd0db7509965d6efd2f00..5ecb4c98e5be711f89c138cdcb2cc808fa272e09 100644 (file)
--- a/rfc1524.h
+++ b/rfc1524.h
@@ -36,13 +36,9 @@ typedef struct rfc1524_mailcap_entry {
 
 rfc1524_entry *rfc1524_new_entry (void);
 void rfc1524_free_entry (rfc1524_entry **);
-int rfc1524_expand_command (BODY *, const char *, const char *, char *, int);
+int mutt_rfc1524_expand_command (BODY *, const char *, const char *, BUFFER *);
 int mutt_rfc1524_expand_filename (const char *, const char *, BUFFER *);
 int rfc1524_mailcap_lookup (BODY *, char *, rfc1524_entry *, int);
 int mutt_rename_file (const char *, const char *);
 
-
-/* Temporary BUFFER transition functions */
-int mutt_buffer_rfc1524_expand_command (BODY *, const char *, const char *, BUFFER *);
-
 #endif /* _RFC1524_H */