aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJuanma Barranquero2011-03-29 16:00:16 +0200
committerJuanma Barranquero2011-03-29 16:00:16 +0200
commit94eab1c84d9862cb56db2f610362e33107d75774 (patch)
tree4a0761bfc1d9d4879eb822d2de0fb8311de2e05a /src
parentb62f8267c3356c0f8d5357d148726a82bf37b371 (diff)
downloademacs-94eab1c84d9862cb56db2f610362e33107d75774.tar.gz
emacs-94eab1c84d9862cb56db2f610362e33107d75774.zip
src/scroll.c, src/w32.c: Trivial whitespace changes.
Diffstat (limited to 'src')
-rw-r--r--src/scroll.c11
-rw-r--r--src/w32.c105
2 files changed, 61 insertions, 55 deletions
diff --git a/src/scroll.c b/src/scroll.c
index f013ebbee0e..fcec596daa3 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -239,7 +239,9 @@ calculate_scrolling (FRAME_PTR frame,
239 of lines. */ 239 of lines. */
240 240
241static void 241static void
242do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, struct matrix_elt *matrix, int window_size, int unchanged_at_top) 242do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
243 struct matrix_elt *matrix, int window_size,
244 int unchanged_at_top)
243{ 245{
244 struct matrix_elt *p; 246 struct matrix_elt *p;
245 int i, j, k; 247 int i, j, k;
@@ -831,7 +833,9 @@ scrolling_1 (FRAME_PTR frame, int window_size, int unchanged_at_top,
831 such a line will have little weight. */ 833 such a line will have little weight. */
832 834
833int 835int
834scrolling_max_lines_saved (int start, int end, int *oldhash, int *newhash, int *cost) 836scrolling_max_lines_saved (int start, int end,
837 int *oldhash, int *newhash,
838 int *cost)
835{ 839{
836 struct { int hash; int count; } lines[01000]; 840 struct { int hash; int count; } lines[01000];
837 register int i, h; 841 register int i, h;
@@ -920,7 +924,8 @@ scroll_cost (FRAME_PTR frame, int from, int to, int amount)
920 overhead and multiply factor values */ 924 overhead and multiply factor values */
921 925
922static void 926static void
923line_ins_del (FRAME_PTR frame, int ov1, int pf1, int ovn, int pfn, register int *ov, register int *mf) 927line_ins_del (FRAME_PTR frame, int ov1, int pf1, int ovn, int pfn,
928 register int *ov, register int *mf)
924{ 929{
925 register EMACS_INT i; 930 register EMACS_INT i;
926 register EMACS_INT frame_lines = FRAME_LINES (frame); 931 register EMACS_INT frame_lines = FRAME_LINES (frame);
diff --git a/src/w32.c b/src/w32.c
index 495f878d3a8..da403671115 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -1505,6 +1505,7 @@ w32_get_resource (char *key, LPDWORD lpdwtype)
1505} 1505}
1506 1506
1507char *get_emacs_configuration (void); 1507char *get_emacs_configuration (void);
1508
1508void 1509void
1509init_environment (char ** argv) 1510init_environment (char ** argv)
1510{ 1511{
@@ -1591,25 +1592,25 @@ init_environment (char ** argv)
1591 If not, then we can try to default to the appdata directory under the 1592 If not, then we can try to default to the appdata directory under the
1592 user's profile, which is more likely to be writable. */ 1593 user's profile, which is more likely to be writable. */
1593 if (stat ("C:/.emacs", &ignored) < 0) 1594 if (stat ("C:/.emacs", &ignored) < 0)
1594 { 1595 {
1595 HRESULT profile_result; 1596 HRESULT profile_result;
1596 /* Dynamically load ShGetFolderPath, as it won't exist on versions 1597 /* Dynamically load ShGetFolderPath, as it won't exist on versions
1597 of Windows 95 and NT4 that have not been updated to include 1598 of Windows 95 and NT4 that have not been updated to include
1598 MSIE 5. */ 1599 MSIE 5. */
1599 ShGetFolderPath_fn get_folder_path; 1600 ShGetFolderPath_fn get_folder_path;
1600 get_folder_path = (ShGetFolderPath_fn) 1601 get_folder_path = (ShGetFolderPath_fn)
1601 GetProcAddress (GetModuleHandle ("shell32.dll"), "SHGetFolderPathA"); 1602 GetProcAddress (GetModuleHandle ("shell32.dll"), "SHGetFolderPathA");
1602 1603
1603 if (get_folder_path != NULL) 1604 if (get_folder_path != NULL)
1604 { 1605 {
1605 profile_result = get_folder_path (NULL, CSIDL_APPDATA, NULL, 1606 profile_result = get_folder_path (NULL, CSIDL_APPDATA, NULL,
1606 0, default_home); 1607 0, default_home);
1607 1608
1608 /* If we can't get the appdata dir, revert to old behavior. */ 1609 /* If we can't get the appdata dir, revert to old behavior. */
1609 if (profile_result == S_OK) 1610 if (profile_result == S_OK)
1610 env_vars[0].def_value = default_home; 1611 env_vars[0].def_value = default_home;
1611 } 1612 }
1612 } 1613 }
1613 1614
1614 /* Get default locale info and use it for LANG. */ 1615 /* Get default locale info and use it for LANG. */
1615 if (GetLocaleInfo (LOCALE_USER_DEFAULT, 1616 if (GetLocaleInfo (LOCALE_USER_DEFAULT,
@@ -2082,42 +2083,42 @@ GetCachedVolumeInformation (char * root_dir)
2082 info = lookup_volume_info (root_dir); 2083 info = lookup_volume_info (root_dir);
2083 2084
2084 if (info == NULL || ! VOLINFO_STILL_VALID (root_dir, info)) 2085 if (info == NULL || ! VOLINFO_STILL_VALID (root_dir, info))
2085 { 2086 {
2086 char name[ 256 ]; 2087 char name[ 256 ];
2087 DWORD serialnum; 2088 DWORD serialnum;
2088 DWORD maxcomp; 2089 DWORD maxcomp;
2089 DWORD flags; 2090 DWORD flags;
2090 char type[ 256 ]; 2091 char type[ 256 ];
2091 2092
2092 /* Info is not cached, or is stale. */ 2093 /* Info is not cached, or is stale. */
2093 if (!GetVolumeInformation (root_dir, 2094 if (!GetVolumeInformation (root_dir,
2094 name, sizeof (name), 2095 name, sizeof (name),
2095 &serialnum, 2096 &serialnum,
2096 &maxcomp, 2097 &maxcomp,
2097 &flags, 2098 &flags,
2098 type, sizeof (type))) 2099 type, sizeof (type)))
2099 return NULL; 2100 return NULL;
2100 2101
2101 /* Cache the volume information for future use, overwriting existing 2102 /* Cache the volume information for future use, overwriting existing
2102 entry if present. */ 2103 entry if present. */
2103 if (info == NULL) 2104 if (info == NULL)
2104 { 2105 {
2105 info = (volume_info_data *) xmalloc (sizeof (volume_info_data)); 2106 info = (volume_info_data *) xmalloc (sizeof (volume_info_data));
2106 add_volume_info (root_dir, info); 2107 add_volume_info (root_dir, info);
2107 } 2108 }
2108 else 2109 else
2109 { 2110 {
2110 xfree (info->name); 2111 xfree (info->name);
2111 xfree (info->type); 2112 xfree (info->type);
2112 } 2113 }
2113 2114
2114 info->name = xstrdup (name); 2115 info->name = xstrdup (name);
2115 info->serialnum = serialnum; 2116 info->serialnum = serialnum;
2116 info->maxcomp = maxcomp; 2117 info->maxcomp = maxcomp;
2117 info->flags = flags; 2118 info->flags = flags;
2118 info->type = xstrdup (type); 2119 info->type = xstrdup (type);
2119 info->timestamp = GetTickCount (); 2120 info->timestamp = GetTickCount ();
2120 } 2121 }
2121 2122
2122 return info; 2123 return info;
2123} 2124}