[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/w32fns.c,v
From: |
Adrian Robert |
Subject: |
[Emacs-diffs] Changes to emacs/src/w32fns.c,v |
Date: |
Fri, 01 Aug 2008 11:48:31 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Adrian Robert <arobert> 08/08/01 11:48:29
Index: src/w32fns.c
===================================================================
RCS file: /sources/emacs/emacs/src/w32fns.c,v
retrieving revision 1.344
retrieving revision 1.345
diff -u -b -r1.344 -r1.345
--- src/w32fns.c 31 Jul 2008 02:47:29 -0000 1.344
+++ src/w32fns.c 1 Aug 2008 11:48:29 -0000 1.345
@@ -502,53 +502,6 @@
return (oldrgb);
}
-DEFUN ("w32-load-color-file", Fw32_load_color_file,
- Sw32_load_color_file, 1, 1, 0,
- doc: /* Create an alist of color entries from an external file.
-Assign this value to `w32-color-map' to replace the existing color map.
-
-The file should define one named RGB color per line like so:
- R G B name
-where R,G,B are numbers between 0 and 255 and name is an arbitrary string. */)
- (filename)
- Lisp_Object filename;
-{
- FILE *fp;
- Lisp_Object cmap = Qnil;
- Lisp_Object abspath;
-
- CHECK_STRING (filename);
- abspath = Fexpand_file_name (filename, Qnil);
-
- fp = fopen (SDATA (filename), "rt");
- if (fp)
- {
- char buf[512];
- int red, green, blue;
- int num;
-
- BLOCK_INPUT;
-
- while (fgets (buf, sizeof (buf), fp) != NULL) {
- if (sscanf (buf, "%u %u %u %n", &red, &green, &blue, &num) == 3)
- {
- char *name = buf + num;
- num = strlen (name) - 1;
- if (name[num] == '\n')
- name[num] = 0;
- cmap = Fcons (Fcons (build_string (name),
- make_number (RGB (red, green, blue))),
- cmap);
- }
- }
- fclose (fp);
-
- UNBLOCK_INPUT;
- }
-
- return cmap;
-}
-
/* The default colors for the w32 color map */
typedef struct colormap_t
{
@@ -4995,7 +4948,7 @@
Fexpand_file_name (build_string ("rgb.txt"),
Fsymbol_value (intern ("data-directory")));
- Vw32_color_map = Fw32_load_color_file (color_file);
+ Vw32_color_map = Fx_load_color_file (color_file);
UNGCPRO;
}
@@ -7226,7 +7179,6 @@
defsubr (&Sw32_define_rgb_color);
defsubr (&Sw32_default_color_map);
- defsubr (&Sw32_load_color_file);
defsubr (&Sw32_send_sys_command);
defsubr (&Sw32_shell_execute);
defsubr (&Sw32_register_hot_key);
- [Emacs-diffs] Changes to emacs/src/w32fns.c,v,
Adrian Robert <=