Mercurial > hg > xemacs-beta
comparison src/sysdep.c @ 2340:91a83e231f92
[xemacs-hg @ 2004-10-19 17:18:59 by james]
Mark more unused parameters.
author | james |
---|---|
date | Tue, 19 Oct 2004 17:19:07 +0000 |
parents | 2200ebac5409 |
children | ecf1ebac70d8 |
comparison
equal
deleted
inserted
replaced
2339:74a78941c2c1 | 2340:91a83e231f92 |
---|---|
121 static void hft_init (struct console *c); | 121 static void hft_init (struct console *c); |
122 static void hft_reset (struct console *c); | 122 static void hft_reset (struct console *c); |
123 #include <sys/termio.h> | 123 #include <sys/termio.h> |
124 #endif | 124 #endif |
125 | 125 |
126 #ifdef HAVE_TTY | |
127 #define USED_IF_TTY(decl) decl | |
128 #else | |
129 #define USED_IF_TTY(decl) UNUSED (decl) | |
130 #endif | |
131 | |
126 | 132 |
127 /************************************************************************/ | 133 /************************************************************************/ |
128 /* subprocess control */ | 134 /* subprocess control */ |
129 /************************************************************************/ | 135 /************************************************************************/ |
130 | 136 |
188 #endif | 194 #endif |
189 /* Ok to do nothing if this feature does not exist */ | 195 /* Ok to do nothing if this feature does not exist */ |
190 } | 196 } |
191 | 197 |
192 void | 198 void |
193 set_descriptor_non_blocking (int fd) | 199 set_descriptor_non_blocking ( |
200 #if defined (STRIDE) || (defined (pfa) && defined (HAVE_PTYS)) || defined (AIX) || defined (F_SETFL) | |
201 int fd | |
202 #else | |
203 int UNUSED (fd) | |
204 #endif | |
205 ) | |
194 { | 206 { |
195 /* Stride people say it's a mystery why this is needed | 207 /* Stride people say it's a mystery why this is needed |
196 as well as the O_NDELAY, but that it fails without this. */ | 208 as well as the O_NDELAY, but that it fails without this. */ |
197 /* For AIX: Apparently need this for non-blocking reads on sockets. | 209 /* For AIX: Apparently need this for non-blocking reads on sockets. |
198 It seems that O_NONBLOCK applies only to FIFOs? From | 210 It seems that O_NONBLOCK applies only to FIFOs? From |
708 #endif | 720 #endif |
709 } | 721 } |
710 | 722 |
711 /* Suspend a process if possible; give terminal to its superior. */ | 723 /* Suspend a process if possible; give terminal to its superior. */ |
712 void | 724 void |
713 sys_suspend_process (int process) | 725 sys_suspend_process ( |
726 #ifdef SIGTSTP | |
727 int process | |
728 #else | |
729 int UNUSED (process) | |
730 #endif | |
731 ) | |
714 { | 732 { |
715 /* I don't doubt that it is possible to suspend processes on | 733 /* I don't doubt that it is possible to suspend processes on |
716 * VMS machines or thost that use USG_JOBCTRL, | 734 * VMS machines or thost that use USG_JOBCTRL, |
717 * but I don't know how to do it, so... | 735 * but I don't know how to do it, so... |
718 */ | 736 */ |
724 | 742 |
725 /* Given FD, obtain pty buffer size. When no luck, a good guess is made, | 743 /* Given FD, obtain pty buffer size. When no luck, a good guess is made, |
726 so that the function works even when fd is not a pty. */ | 744 so that the function works even when fd is not a pty. */ |
727 | 745 |
728 int | 746 int |
729 get_pty_max_bytes (int fd) | 747 get_pty_max_bytes ( |
748 #if defined (HAVE_FPATHCONF) && defined (_PC_MAX_CANON) | |
749 int fd | |
750 #else | |
751 int UNUSED (fd) | |
752 #endif | |
753 ) | |
730 { | 754 { |
731 /* DEC OSF 4.0 fpathconf returns 255, but xemacs hangs on long shell | 755 /* DEC OSF 4.0 fpathconf returns 255, but xemacs hangs on long shell |
732 input lines if we return 253. 252 is OK!. So let's leave a bit | 756 input lines if we return 253. 252 is OK!. So let's leave a bit |
733 of slack for the newline that xemacs will insert, and for those | 757 of slack for the newline that xemacs will insert, and for those |
734 inevitable vendor off-by-one-or-two-or-three bugs. */ | 758 inevitable vendor off-by-one-or-two-or-three bugs. */ |
809 | 833 |
810 /* Set the logical window size associated with descriptor FD | 834 /* Set the logical window size associated with descriptor FD |
811 to HEIGHT and WIDTH. This is used mainly with ptys. */ | 835 to HEIGHT and WIDTH. This is used mainly with ptys. */ |
812 | 836 |
813 int | 837 int |
814 set_window_size (int fd, int height, int width) | 838 set_window_size ( |
839 #if defined (TIOCSWINSZ) || defined (TIOCSSIZE) | |
840 int fd, int height, int width | |
841 #else | |
842 int UNUSED (fd), int UNUSED (height), int UNUSED (width) | |
843 #endif | |
844 ) | |
815 { | 845 { |
816 #ifdef TIOCSWINSZ | 846 #ifdef TIOCSWINSZ |
817 | 847 |
818 /* BSD-style. */ | 848 /* BSD-style. */ |
819 struct winsize size; | 849 struct winsize size; |
842 } | 872 } |
843 | 873 |
844 /* Set up the proper status flags for use of a pty. */ | 874 /* Set up the proper status flags for use of a pty. */ |
845 | 875 |
846 void | 876 void |
847 setup_pty (int fd) | 877 setup_pty ( |
878 #ifdef TIOCPKT | |
879 int fd | |
880 #else | |
881 int UNUSED (fd) | |
882 #endif | |
883 ) | |
848 { | 884 { |
849 #ifdef IBMRTAIX | 885 #ifdef IBMRTAIX |
850 /* On AIX, the parent gets SIGHUP when a pty attached child dies. So, we */ | 886 /* On AIX, the parent gets SIGHUP when a pty attached child dies. So, we */ |
851 /* ignore SIGHUP once we've started a child on a pty. Note that this may */ | 887 /* ignore SIGHUP once we've started a child on a pty. Note that this may */ |
852 /* cause EMACS not to die when it should, i.e., when its own controlling */ | 888 /* cause EMACS not to die when it should, i.e., when its own controlling */ |
1730 } | 1766 } |
1731 | 1767 |
1732 #endif /* HAVE_TTY */ | 1768 #endif /* HAVE_TTY */ |
1733 | 1769 |
1734 void | 1770 void |
1735 init_one_device (struct device *d) | 1771 init_one_device ( |
1772 #if defined(HAVE_TTY) || (defined(SIGIO) && !defined(BROKEN_SIGIO)) | |
1773 struct device *d | |
1774 #else | |
1775 struct device *UNUSED (d) | |
1776 #endif | |
1777 ) | |
1736 { | 1778 { |
1737 #ifdef HAVE_TTY | 1779 #ifdef HAVE_TTY |
1738 if (DEVICE_TTY_P (d)) | 1780 if (DEVICE_TTY_P (d)) |
1739 tty_init_sys_modes_on_device (d); | 1781 tty_init_sys_modes_on_device (d); |
1740 #endif | 1782 #endif |
1780 | 1822 |
1781 /* Return nonzero if safe to use tabs in output. | 1823 /* Return nonzero if safe to use tabs in output. |
1782 At the time this is called, init_sys_modes has not been done yet. */ | 1824 At the time this is called, init_sys_modes has not been done yet. */ |
1783 | 1825 |
1784 int | 1826 int |
1785 tabs_safe_p (struct device *d) | 1827 tabs_safe_p (struct device *USED_IF_TTY (d)) |
1786 { | 1828 { |
1787 #ifdef HAVE_TTY | 1829 #ifdef HAVE_TTY |
1788 if (DEVICE_TTY_P (d)) | 1830 if (DEVICE_TTY_P (d)) |
1789 { | 1831 { |
1790 struct emacs_tty tty; | 1832 struct emacs_tty tty; |
2519 */ | 2561 */ |
2520 | 2562 |
2521 /* Ben sez: read Dick Gabriel's essay about the Worse Is Better | 2563 /* Ben sez: read Dick Gabriel's essay about the Worse Is Better |
2522 approach to programming and its connection to the silly | 2564 approach to programming and its connection to the silly |
2523 interruptible-system-call business. To find it, look on | 2565 interruptible-system-call business. To find it, look on |
2524 Jamie's home page (http://www.jwz.org/worse-is-better.html). */ | 2566 Jamie's home page (http://www.jwz.org/doc/worse-is-better.html). */ |
2525 | 2567 |
2526 #ifdef WIN32_NATIVE | 2568 #ifdef WIN32_NATIVE |
2527 | 2569 |
2528 static int | 2570 static int |
2529 underlying_open_1 (const Extbyte *path, int oflag, int mode) | 2571 underlying_open_1 (const Extbyte *path, int oflag, int mode) |
2891 return chdir (pathout); | 2933 return chdir (pathout); |
2892 #endif | 2934 #endif |
2893 } | 2935 } |
2894 | 2936 |
2895 int | 2937 int |
2896 qxe_mkdir (const Ibyte *path, mode_t mode) | 2938 qxe_mkdir (const Ibyte *path, |
2939 #ifdef WIN32_NATIVE | |
2940 mode_t UNUSED (mode) | |
2941 #else | |
2942 mode_t mode | |
2943 #endif | |
2944 ) | |
2897 { | 2945 { |
2898 Extbyte *pathout; | 2946 Extbyte *pathout; |
2899 PATHNAME_CONVERT_OUT (path, pathout); | 2947 PATHNAME_CONVERT_OUT (path, pathout); |
2900 #ifdef WIN32_NATIVE | 2948 #ifdef WIN32_NATIVE |
2901 if (XEUNICODE_P) | 2949 if (XEUNICODE_P) |
3510 | 3558 |
3511 /* No need to encapsulate utime and utimes explicitly because all | 3559 /* No need to encapsulate utime and utimes explicitly because all |
3512 access to those functions goes through the following. */ | 3560 access to those functions goes through the following. */ |
3513 | 3561 |
3514 int | 3562 int |
3515 set_file_times (Lisp_Object path, EMACS_TIME atime, EMACS_TIME mtime) | 3563 set_file_times ( |
3564 #if defined (WIN32_NATIVE) || defined (HAVE_UTIME) || defined (HAVE_UTIMES) | |
3565 Lisp_Object path, EMACS_TIME atime, EMACS_TIME mtime | |
3566 #else | |
3567 Lisp_Object UNUSED (path), EMACS_TIME UNUSED (atime), | |
3568 EMACS_TIME UNUSED (mtime) | |
3569 #endif | |
3570 ) | |
3516 { | 3571 { |
3517 #if defined (WIN32_NATIVE) | 3572 #if defined (WIN32_NATIVE) |
3518 struct utimbuf utb; | 3573 struct utimbuf utb; |
3519 utb.actime = EMACS_SECS (atime); | 3574 utb.actime = EMACS_SECS (atime); |
3520 utb.modtime = EMACS_SECS (mtime); | 3575 utb.modtime = EMACS_SECS (mtime); |
3550 /* Return the relative user and system tick count. We try to | 3605 /* Return the relative user and system tick count. We try to |
3551 maintain calculations in terms of integers as long as possible | 3606 maintain calculations in terms of integers as long as possible |
3552 for increased accuracy. */ | 3607 for increased accuracy. */ |
3553 | 3608 |
3554 static int | 3609 static int |
3555 get_process_times_1 (long *user_ticks, long *system_ticks) | 3610 get_process_times_1 ( |
3611 #if defined (CLOCKS_PER_SEC) || defined (_SC_CLK_TCK) || defined (CLK_TCK) && !defined(WIN32_NATIVE) | |
3612 long *user_ticks, long *system_ticks | |
3613 #else | |
3614 long *UNUSED (user_ticks), long *UNUSED (system_ticks) | |
3615 #endif | |
3616 ) | |
3556 { | 3617 { |
3557 #if defined (_SC_CLK_TCK) || defined (CLK_TCK) && !defined(WIN32_NATIVE) | 3618 #if defined (_SC_CLK_TCK) || defined (CLK_TCK) && !defined(WIN32_NATIVE) |
3558 /* We have the POSIX times() function available. */ | 3619 /* We have the POSIX times() function available. */ |
3559 /* #### Perhaps we should just use a configure test for times()? */ | 3620 /* #### Perhaps we should just use a configure test for times()? */ |
3560 struct tms tttt; | 3621 struct tms tttt; |