diff options
| author | Dan Nicolaescu | 2010-07-08 14:25:08 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-07-08 14:25:08 -0700 |
| commit | 5842a27bbfb7efa6872824e501bc7ec98b631553 (patch) | |
| tree | d173899af9cbed9d90d94cfc710e6ecc06dd1f6b /src/w32proc.c | |
| parent | 71c44c04bb996abe77db8efd88255fde06532b10 (diff) | |
| download | emacs-5842a27bbfb7efa6872824e501bc7ec98b631553.tar.gz emacs-5842a27bbfb7efa6872824e501bc7ec98b631553.zip | |
Convert DEFUNs to standard C.
* src/alloc.c: Convert DEFUNs to standard C.
* src/buffer.c:
* src/bytecode.c:
* src/callint.c:
* src/callproc.c:
* src/casefiddle.c:
* src/casetab.c:
* src/category.c:
* src/character.c:
* src/charset.c:
* src/chartab.c:
* src/cmds.c:
* src/coding.c:
* src/composite.c:
* src/data.c:
* src/dbusbind.c:
* src/dired.c:
* src/dispnew.c:
* src/doc.c:
* src/dosfns.c:
* src/editfns.c:
* src/emacs.c:
* src/eval.c:
* src/fileio.c:
* src/filelock.c:
* src/floatfns.c:
* src/fns.c:
* src/font.c:
* src/fontset.c:
* src/frame.c:
* src/fringe.c:
* src/image.c:
* src/indent.c:
* src/insdel.c:
* src/keyboard.c:
* src/keymap.c:
* src/lread.c:
* src/macros.c:
* src/marker.c:
* src/menu.c:
* src/minibuf.c:
* src/msdos.c:
* src/nsfns.m:
* src/nsmenu.m:
* src/nsselect.m:
* src/print.c:
* src/process.c:
* src/search.c:
* src/sound.c:
* src/syntax.c:
* src/term.c:
* src/terminal.c:
* src/textprop.c:
* src/undo.c:
* src/w16select.c:
* src/w32console.c:
* src/w32fns.c:
* src/w32font.c:
* src/w32menu.c:
* src/w32proc.c:
* src/w32select.c:
* src/window.c:
* src/xdisp.c:
* src/xfaces.c:
* src/xfns.c:
* src/xmenu.c:
* src/xselect.c:
* src/xsettings.c:
* src/xsmfns.c: Likewise.
Diffstat (limited to 'src/w32proc.c')
| -rw-r--r-- | src/w32proc.c | 49 |
1 files changed, 19 insertions, 30 deletions
diff --git a/src/w32proc.c b/src/w32proc.c index eccdcc30553..af923723709 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -1723,8 +1723,7 @@ also loaded immediately if not already loaded. If winsock is loaded, | |||
| 1723 | the winsock local hostname is returned (since this may be different from | 1723 | the winsock local hostname is returned (since this may be different from |
| 1724 | the value of `system-name' and should supplant it), otherwise t is | 1724 | the value of `system-name' and should supplant it), otherwise t is |
| 1725 | returned to indicate winsock support is present. */) | 1725 | returned to indicate winsock support is present. */) |
| 1726 | (load_now) | 1726 | (Lisp_Object load_now) |
| 1727 | Lisp_Object load_now; | ||
| 1728 | { | 1727 | { |
| 1729 | int have_winsock; | 1728 | int have_winsock; |
| 1730 | 1729 | ||
| @@ -1755,7 +1754,7 @@ DEFUN ("w32-unload-winsock", Fw32_unload_winsock, Sw32_unload_winsock, | |||
| 1755 | This is provided to allow dial-up socket connections to be disconnected | 1754 | This is provided to allow dial-up socket connections to be disconnected |
| 1756 | when no longer needed. Returns nil without unloading winsock if any | 1755 | when no longer needed. Returns nil without unloading winsock if any |
| 1757 | socket connections still exist. */) | 1756 | socket connections still exist. */) |
| 1758 | () | 1757 | (void) |
| 1759 | { | 1758 | { |
| 1760 | return term_winsock () ? Qt : Qnil; | 1759 | return term_winsock () ? Qt : Qnil; |
| 1761 | } | 1760 | } |
| @@ -1770,8 +1769,7 @@ DEFUN ("w32-short-file-name", Fw32_short_file_name, Sw32_short_file_name, 1, 1, | |||
| 1770 | doc: /* Return the short file name version (8.3) of the full path of FILENAME. | 1769 | doc: /* Return the short file name version (8.3) of the full path of FILENAME. |
| 1771 | If FILENAME does not exist, return nil. | 1770 | If FILENAME does not exist, return nil. |
| 1772 | All path elements in FILENAME are converted to their short names. */) | 1771 | All path elements in FILENAME are converted to their short names. */) |
| 1773 | (filename) | 1772 | (Lisp_Object filename) |
| 1774 | Lisp_Object filename; | ||
| 1775 | { | 1773 | { |
| 1776 | char shortname[MAX_PATH]; | 1774 | char shortname[MAX_PATH]; |
| 1777 | 1775 | ||
| @@ -1795,8 +1793,7 @@ DEFUN ("w32-long-file-name", Fw32_long_file_name, Sw32_long_file_name, | |||
| 1795 | doc: /* Return the long file name version of the full path of FILENAME. | 1793 | doc: /* Return the long file name version of the full path of FILENAME. |
| 1796 | If FILENAME does not exist, return nil. | 1794 | If FILENAME does not exist, return nil. |
| 1797 | All path elements in FILENAME are converted to their long names. */) | 1795 | All path elements in FILENAME are converted to their long names. */) |
| 1798 | (filename) | 1796 | (Lisp_Object filename) |
| 1799 | Lisp_Object filename; | ||
| 1800 | { | 1797 | { |
| 1801 | char longname[ MAX_PATH ]; | 1798 | char longname[ MAX_PATH ]; |
| 1802 | int drive_only = 0; | 1799 | int drive_only = 0; |
| @@ -1833,8 +1830,7 @@ PRIORITY should be one of the symbols high, normal, or low; | |||
| 1833 | any other symbol will be interpreted as normal. | 1830 | any other symbol will be interpreted as normal. |
| 1834 | 1831 | ||
| 1835 | If successful, the return value is t, otherwise nil. */) | 1832 | If successful, the return value is t, otherwise nil. */) |
| 1836 | (process, priority) | 1833 | (Lisp_Object process, Lisp_Object priority) |
| 1837 | Lisp_Object process, priority; | ||
| 1838 | { | 1834 | { |
| 1839 | HANDLE proc_handle = GetCurrentProcess (); | 1835 | HANDLE proc_handle = GetCurrentProcess (); |
| 1840 | DWORD priority_class = NORMAL_PRIORITY_CLASS; | 1836 | DWORD priority_class = NORMAL_PRIORITY_CLASS; |
| @@ -1956,8 +1952,7 @@ is a number, it is interpreted as an LCTYPE constant and the corresponding | |||
| 1956 | locale information is returned. | 1952 | locale information is returned. |
| 1957 | 1953 | ||
| 1958 | If LCID (a 16-bit number) is not a valid locale, the result is nil. */) | 1954 | If LCID (a 16-bit number) is not a valid locale, the result is nil. */) |
| 1959 | (lcid, longform) | 1955 | (Lisp_Object lcid, Lisp_Object longform) |
| 1960 | Lisp_Object lcid, longform; | ||
| 1961 | { | 1956 | { |
| 1962 | int got_abbrev; | 1957 | int got_abbrev; |
| 1963 | int got_full; | 1958 | int got_full; |
| @@ -2003,7 +1998,7 @@ DEFUN ("w32-get-current-locale-id", Fw32_get_current_locale_id, | |||
| 2003 | doc: /* Return Windows locale id for current locale setting. | 1998 | doc: /* Return Windows locale id for current locale setting. |
| 2004 | This is a numerical value; use `w32-get-locale-info' to convert to a | 1999 | This is a numerical value; use `w32-get-locale-info' to convert to a |
| 2005 | human-readable form. */) | 2000 | human-readable form. */) |
| 2006 | () | 2001 | (void) |
| 2007 | { | 2002 | { |
| 2008 | return make_number (GetThreadLocale ()); | 2003 | return make_number (GetThreadLocale ()); |
| 2009 | } | 2004 | } |
| @@ -2043,7 +2038,7 @@ DEFUN ("w32-get-valid-locale-ids", Fw32_get_valid_locale_ids, | |||
| 2043 | doc: /* Return list of all valid Windows locale ids. | 2038 | doc: /* Return list of all valid Windows locale ids. |
| 2044 | Each id is a numerical value; use `w32-get-locale-info' to convert to a | 2039 | Each id is a numerical value; use `w32-get-locale-info' to convert to a |
| 2045 | human-readable form. */) | 2040 | human-readable form. */) |
| 2046 | () | 2041 | (void) |
| 2047 | { | 2042 | { |
| 2048 | Vw32_valid_locale_ids = Qnil; | 2043 | Vw32_valid_locale_ids = Qnil; |
| 2049 | 2044 | ||
| @@ -2060,8 +2055,7 @@ By default, the system default locale setting is returned; if the optional | |||
| 2060 | parameter USERP is non-nil, the user default locale setting is returned. | 2055 | parameter USERP is non-nil, the user default locale setting is returned. |
| 2061 | This is a numerical value; use `w32-get-locale-info' to convert to a | 2056 | This is a numerical value; use `w32-get-locale-info' to convert to a |
| 2062 | human-readable form. */) | 2057 | human-readable form. */) |
| 2063 | (userp) | 2058 | (Lisp_Object userp) |
| 2064 | Lisp_Object userp; | ||
| 2065 | { | 2059 | { |
| 2066 | if (NILP (userp)) | 2060 | if (NILP (userp)) |
| 2067 | return make_number (GetSystemDefaultLCID ()); | 2061 | return make_number (GetSystemDefaultLCID ()); |
| @@ -2072,8 +2066,7 @@ human-readable form. */) | |||
| 2072 | DEFUN ("w32-set-current-locale", Fw32_set_current_locale, Sw32_set_current_locale, 1, 1, 0, | 2066 | DEFUN ("w32-set-current-locale", Fw32_set_current_locale, Sw32_set_current_locale, 1, 1, 0, |
| 2073 | doc: /* Make Windows locale LCID be the current locale setting for Emacs. | 2067 | doc: /* Make Windows locale LCID be the current locale setting for Emacs. |
| 2074 | If successful, the new locale id is returned, otherwise nil. */) | 2068 | If successful, the new locale id is returned, otherwise nil. */) |
| 2075 | (lcid) | 2069 | (Lisp_Object lcid) |
| 2076 | Lisp_Object lcid; | ||
| 2077 | { | 2070 | { |
| 2078 | CHECK_NUMBER (lcid); | 2071 | CHECK_NUMBER (lcid); |
| 2079 | 2072 | ||
| @@ -2107,7 +2100,7 @@ enum_codepage_fn (LPTSTR codepageNum) | |||
| 2107 | DEFUN ("w32-get-valid-codepages", Fw32_get_valid_codepages, | 2100 | DEFUN ("w32-get-valid-codepages", Fw32_get_valid_codepages, |
| 2108 | Sw32_get_valid_codepages, 0, 0, 0, | 2101 | Sw32_get_valid_codepages, 0, 0, 0, |
| 2109 | doc: /* Return list of all valid Windows codepages. */) | 2102 | doc: /* Return list of all valid Windows codepages. */) |
| 2110 | () | 2103 | (void) |
| 2111 | { | 2104 | { |
| 2112 | Vw32_valid_codepages = Qnil; | 2105 | Vw32_valid_codepages = Qnil; |
| 2113 | 2106 | ||
| @@ -2121,7 +2114,7 @@ DEFUN ("w32-get-valid-codepages", Fw32_get_valid_codepages, | |||
| 2121 | DEFUN ("w32-get-console-codepage", Fw32_get_console_codepage, | 2114 | DEFUN ("w32-get-console-codepage", Fw32_get_console_codepage, |
| 2122 | Sw32_get_console_codepage, 0, 0, 0, | 2115 | Sw32_get_console_codepage, 0, 0, 0, |
| 2123 | doc: /* Return current Windows codepage for console input. */) | 2116 | doc: /* Return current Windows codepage for console input. */) |
| 2124 | () | 2117 | (void) |
| 2125 | { | 2118 | { |
| 2126 | return make_number (GetConsoleCP ()); | 2119 | return make_number (GetConsoleCP ()); |
| 2127 | } | 2120 | } |
| @@ -2132,8 +2125,7 @@ DEFUN ("w32-set-console-codepage", Fw32_set_console_codepage, | |||
| 2132 | doc: /* Make Windows codepage CP be the current codepage setting for Emacs. | 2125 | doc: /* Make Windows codepage CP be the current codepage setting for Emacs. |
| 2133 | The codepage setting affects keyboard input and display in tty mode. | 2126 | The codepage setting affects keyboard input and display in tty mode. |
| 2134 | If successful, the new CP is returned, otherwise nil. */) | 2127 | If successful, the new CP is returned, otherwise nil. */) |
| 2135 | (cp) | 2128 | (Lisp_Object cp) |
| 2136 | Lisp_Object cp; | ||
| 2137 | { | 2129 | { |
| 2138 | CHECK_NUMBER (cp); | 2130 | CHECK_NUMBER (cp); |
| 2139 | 2131 | ||
| @@ -2150,7 +2142,7 @@ If successful, the new CP is returned, otherwise nil. */) | |||
| 2150 | DEFUN ("w32-get-console-output-codepage", Fw32_get_console_output_codepage, | 2142 | DEFUN ("w32-get-console-output-codepage", Fw32_get_console_output_codepage, |
| 2151 | Sw32_get_console_output_codepage, 0, 0, 0, | 2143 | Sw32_get_console_output_codepage, 0, 0, 0, |
| 2152 | doc: /* Return current Windows codepage for console output. */) | 2144 | doc: /* Return current Windows codepage for console output. */) |
| 2153 | () | 2145 | (void) |
| 2154 | { | 2146 | { |
| 2155 | return make_number (GetConsoleOutputCP ()); | 2147 | return make_number (GetConsoleOutputCP ()); |
| 2156 | } | 2148 | } |
| @@ -2161,8 +2153,7 @@ DEFUN ("w32-set-console-output-codepage", Fw32_set_console_output_codepage, | |||
| 2161 | doc: /* Make Windows codepage CP be the current codepage setting for Emacs. | 2153 | doc: /* Make Windows codepage CP be the current codepage setting for Emacs. |
| 2162 | The codepage setting affects keyboard input and display in tty mode. | 2154 | The codepage setting affects keyboard input and display in tty mode. |
| 2163 | If successful, the new CP is returned, otherwise nil. */) | 2155 | If successful, the new CP is returned, otherwise nil. */) |
| 2164 | (cp) | 2156 | (Lisp_Object cp) |
| 2165 | Lisp_Object cp; | ||
| 2166 | { | 2157 | { |
| 2167 | CHECK_NUMBER (cp); | 2158 | CHECK_NUMBER (cp); |
| 2168 | 2159 | ||
| @@ -2180,8 +2171,7 @@ DEFUN ("w32-get-codepage-charset", Fw32_get_codepage_charset, | |||
| 2180 | Sw32_get_codepage_charset, 1, 1, 0, | 2171 | Sw32_get_codepage_charset, 1, 1, 0, |
| 2181 | doc: /* Return charset of codepage CP. | 2172 | doc: /* Return charset of codepage CP. |
| 2182 | Returns nil if the codepage is not valid. */) | 2173 | Returns nil if the codepage is not valid. */) |
| 2183 | (cp) | 2174 | (Lisp_Object cp) |
| 2184 | Lisp_Object cp; | ||
| 2185 | { | 2175 | { |
| 2186 | CHARSETINFO info; | 2176 | CHARSETINFO info; |
| 2187 | 2177 | ||
| @@ -2201,7 +2191,7 @@ DEFUN ("w32-get-valid-keyboard-layouts", Fw32_get_valid_keyboard_layouts, | |||
| 2201 | Sw32_get_valid_keyboard_layouts, 0, 0, 0, | 2191 | Sw32_get_valid_keyboard_layouts, 0, 0, 0, |
| 2202 | doc: /* Return list of Windows keyboard languages and layouts. | 2192 | doc: /* Return list of Windows keyboard languages and layouts. |
| 2203 | The return value is a list of pairs of language id and layout id. */) | 2193 | The return value is a list of pairs of language id and layout id. */) |
| 2204 | () | 2194 | (void) |
| 2205 | { | 2195 | { |
| 2206 | int num_layouts = GetKeyboardLayoutList (0, NULL); | 2196 | int num_layouts = GetKeyboardLayoutList (0, NULL); |
| 2207 | HKL * layouts = (HKL *) alloca (num_layouts * sizeof (HKL)); | 2197 | HKL * layouts = (HKL *) alloca (num_layouts * sizeof (HKL)); |
| @@ -2227,7 +2217,7 @@ DEFUN ("w32-get-keyboard-layout", Fw32_get_keyboard_layout, | |||
| 2227 | Sw32_get_keyboard_layout, 0, 0, 0, | 2217 | Sw32_get_keyboard_layout, 0, 0, 0, |
| 2228 | doc: /* Return current Windows keyboard language and layout. | 2218 | doc: /* Return current Windows keyboard language and layout. |
| 2229 | The return value is the cons of the language id and the layout id. */) | 2219 | The return value is the cons of the language id and the layout id. */) |
| 2230 | () | 2220 | (void) |
| 2231 | { | 2221 | { |
| 2232 | DWORD kl = (DWORD) GetKeyboardLayout (dwWindowsThreadId); | 2222 | DWORD kl = (DWORD) GetKeyboardLayout (dwWindowsThreadId); |
| 2233 | 2223 | ||
| @@ -2241,8 +2231,7 @@ DEFUN ("w32-set-keyboard-layout", Fw32_set_keyboard_layout, | |||
| 2241 | doc: /* Make LAYOUT be the current keyboard layout for Emacs. | 2231 | doc: /* Make LAYOUT be the current keyboard layout for Emacs. |
| 2242 | The keyboard layout setting affects interpretation of keyboard input. | 2232 | The keyboard layout setting affects interpretation of keyboard input. |
| 2243 | If successful, the new layout id is returned, otherwise nil. */) | 2233 | If successful, the new layout id is returned, otherwise nil. */) |
| 2244 | (layout) | 2234 | (Lisp_Object layout) |
| 2245 | Lisp_Object layout; | ||
| 2246 | { | 2235 | { |
| 2247 | DWORD kl; | 2236 | DWORD kl; |
| 2248 | 2237 | ||