… | |
… | |
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" |
… | |
… | |
1408 | if (bar == NULL || fp == NULL) |
1407 | if (bar == NULL || fp == NULL) |
1409 | return; |
1408 | return; |
1410 | time (&t); |
1409 | time (&t); |
1411 | |
1410 | |
1412 | fprintf (fp, |
1411 | fprintf (fp, |
1413 | "# " APL_SUBCLASS " (%s) Pid: %u\n# Date: %s\n\n", |
1412 | "# " RESCLASS " (%s) Pid: %u\n# Date: %s\n\n", |
1414 | rs[Rs_name], (unsigned int)getpid (), ctime (&t)); |
1413 | rs[Rs_name], (unsigned int)getpid (), ctime (&t)); |
1415 | |
1414 | |
1416 | /* dump in reverse order */ |
1415 | /* dump in reverse order */ |
1417 | bar = CurrentBar->prev; |
1416 | bar = CurrentBar->prev; |
1418 | do |
1417 | do |
… | |
… | |
1755 | FILE *fp; |
1754 | FILE *fp; |
1756 | |
1755 | |
1757 | /* enough space to hold the results */ |
1756 | /* enough space to hold the results */ |
1758 | char buffer[32]; |
1757 | char buffer[32]; |
1759 | |
1758 | |
1760 | sprintf (buffer, "/tmp/" APL_SUBCLASS "-%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 | xterm_seq (XTerm_title, buffer, CHAR_ST); |
… | |
… | |
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] == '/') |