ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/menubar.C
(Generate patch)

Comparing rxvt-unicode/src/menubar.C (file contents):
Revision 1.12 by pcg, Wed Mar 3 04:07:52 2004 UTC vs.
Revision 1.15 by pcg, Fri Apr 2 00:51:10 2004 UTC

22 * summary that appears at the end of this file was taken from there. 22 * summary that appears at the end of this file was taken from there.
23 *----------------------------------------------------------------------*/ 23 *----------------------------------------------------------------------*/
24 24
25#include "../config.h" /* NECESSARY */ 25#include "../config.h" /* NECESSARY */
26 26
27#include <stdlib.h> 27#include <cstdlib>
28#include <wchar.h>
29 28
30#include "rxvt.h" /* NECESSARY */ 29#include "rxvt.h" /* NECESSARY */
31#ifdef MENUBAR 30#ifdef MENUBAR
32#include "version.h" 31#include "version.h"
33#include "menubar.h" 32#include "menubar.h"
1707 } 1706 }
1708 } 1707 }
1709 else if ((n = rxvt_Str_match (str, "pixmap:")) != 0) 1708 else if ((n = rxvt_Str_match (str, "pixmap:")) != 0)
1710 { 1709 {
1711 str += n; 1710 str += n;
1712 xterm_seq (XTerm_Pixmap, str, CHAR_ST); 1711 process_xterm_seq (XTerm_Pixmap, str, CHAR_ST);
1713 } 1712 }
1714#if (MENUBAR_MAX > 1) 1713#if (MENUBAR_MAX > 1)
1715 else if ((n = rxvt_Str_match (str, "rm")) != 0) 1714 else if ((n = rxvt_Str_match (str, "rm")) != 0)
1716 { 1715 {
1717 str += n; 1716 str += n;
1760 sprintf (buffer, "/tmp/" RESCLASS "-%u", 1759 sprintf (buffer, "/tmp/" RESCLASS "-%u",
1761 (unsigned int)getpid ()); 1760 (unsigned int)getpid ());
1762 1761
1763 if ((fp = fopen (buffer, "wb")) != NULL) 1762 if ((fp = fopen (buffer, "wb")) != NULL)
1764 { 1763 {
1765 xterm_seq (XTerm_title, buffer, CHAR_ST); 1764 process_xterm_seq (XTerm_title, buffer, CHAR_ST);
1766 menubar_dump (fp); 1765 menubar_dump (fp);
1767 fclose (fp); 1766 fclose (fp);
1768 } 1767 }
1769 } 1768 }
1770 else if (!STRCMP (str, "next")) 1769 else if (!STRCMP (str, "next"))
1847 if (name != NULL || str != NULL) 1846 if (name != NULL || str != NULL)
1848 { 1847 {
1849 if (name == NULL || str == NULL || str <= (name + 1) 1848 if (name == NULL || str == NULL || str <= (name + 1)
1850 || (name > path && name[-1] != '/')) 1849 || (name > path && name[-1] != '/'))
1851 { 1850 {
1852 rxvt_print_error ("menu error <%s>\n", path); 1851 rxvt_warn ("menu error A<%s>, continuing.\n", path);
1853 break; 1852 break;
1854 } 1853 }
1855 if (str[1] == MENUITEM_BEG) 1854 if (str[1] == MENUITEM_BEG)
1856 { 1855 {
1857 name2 = (str + 2); 1856 name2 = (str + 2);
1858 str = STRCHR (name2, MENUITEM_END); 1857 str = STRCHR (name2, MENUITEM_END);
1859 1858
1860 if (str == NULL) 1859 if (str == NULL)
1861 { 1860 {
1862 rxvt_print_error ("menu error <%s>\n", path); 1861 rxvt_warn ("menu error B<%s>, continuing.\n", path);
1863 break; 1862 break;
1864 } 1863 }
1865 name2[-2] = '\0'; /* remove prev MENUITEM_END */ 1864 name2[-2] = '\0'; /* remove prev MENUITEM_END */
1866 } 1865 }
1867 if (name > path && name[-1] == '/') 1866 if (name > path && name[-1] == '/')

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines