[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r101048: Use const char* for -Wwrite_
From: |
Jan D |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r101048: Use const char* for -Wwrite_strings. |
Date: |
Wed, 11 Aug 2010 10:58:56 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 101048
committer: Jan D <address@hidden>
branch nick: trunk
timestamp: Wed 2010-08-11 10:58:56 +0200
message:
Use const char* for -Wwrite_strings.
* keyboard.h (_widget_value): name, value and key are const char*.
* nsfont.m (ns_descriptor_to_entity): Use const char*.
* nsmenu.m (parseKeyEquiv, addSubmenuWithTitle)
(addDisplayItemWithImage, update_frame_tool_bar): Use const char*.
* nsterm.h (parseKeyEquiv, addSubmenuWithTitle)
(addDisplayItemWithImage): Use const char*.
modified:
src/ChangeLog
src/keyboard.h
src/nsfont.m
src/nsmenu.m
src/nsterm.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-08-11 08:36:27 +0000
+++ b/src/ChangeLog 2010-08-11 08:58:56 +0000
@@ -1,5 +1,15 @@
2010-08-11 Jan Djärv <address@hidden>
+ * nsterm.h (parseKeyEquiv, addSubmenuWithTitle)
+ (addDisplayItemWithImage): Use const char*.
+
+ * nsmenu.m (parseKeyEquiv, addSubmenuWithTitle)
+ (addDisplayItemWithImage, update_frame_tool_bar): Use const char*.
+
+ * nsfont.m (ns_descriptor_to_entity): Use const char*.
+
+ * keyboard.h (_widget_value): name, value and key are const char*.
+
* unexmacosx.c (unexec_error): Use const char *.
2010-08-09 Dan Nicolaescu <address@hidden>
=== modified file 'src/keyboard.h'
--- a/src/keyboard.h 2010-08-06 19:52:47 +0000
+++ b/src/keyboard.h 2010-08-11 08:58:56 +0000
@@ -338,12 +338,12 @@
{
/* name of widget */
Lisp_Object lname;
- char* name;
+ const char* name;
/* value (meaning depend on widget type) */
- char* value;
+ const char* value;
/* keyboard equivalent. no implications for XtTranslations */
Lisp_Object lkey;
- char* key;
+ const char* key;
/* Help string or nil if none.
GC finds this string through the frame's menu_bar_vector
or through menu_items. */
=== modified file 'src/nsfont.m'
--- a/src/nsfont.m 2010-08-06 10:12:41 +0000
+++ b/src/nsfont.m 2010-08-11 08:58:56 +0000
@@ -161,7 +161,9 @@
/* Converts NSFont descriptor to FONT_WEIGHT, FONT_SLANT, FONT_WIDTH, etc.. */
static Lisp_Object
-ns_descriptor_to_entity (NSFontDescriptor *desc, Lisp_Object extra, char
*style)
+ns_descriptor_to_entity (NSFontDescriptor *desc,
+ Lisp_Object extra,
+ const char *style)
{
Lisp_Object font_entity = font_make_entity ();
/* NSString *psName = [desc postscriptName]; */
=== modified file 'src/nsmenu.m'
--- a/src/nsmenu.m 2010-08-06 10:12:41 +0000
+++ b/src/nsmenu.m 2010-08-11 08:58:56 +0000
@@ -600,9 +600,9 @@
NSMenuItem get ignored. For now we try to display a super-single letter
combo, and return the others as strings to be appended to the item title.
(This is signaled by setting keyEquivModMask to 0 for now.) */
--(NSString *)parseKeyEquiv: (char *)key
+-(NSString *)parseKeyEquiv: (const char *)key
{
- char *tpos = key;
+ const char *tpos = key;
keyEquivModMask = NSCommandKeyMask;
if (!key || !strlen (key))
@@ -719,7 +719,7 @@
/* adds an empty submenu and returns it */
-- (EmacsMenu *)addSubmenuWithTitle: (char *)title forFrame: (struct frame *)f
+- (EmacsMenu *)addSubmenuWithTitle: (const char *)title forFrame: (struct
frame *)f
{
NSString *titleStr = [NSString stringWithUTF8String: title];
NSMenuItem *item = [self addItemWithTitle: titleStr
@@ -836,7 +836,7 @@
{
/* Create a new pane. */
Lisp_Object pane_name, prefix;
- char *pane_string;
+ const char *pane_string;
pane_name = AREF (menu_items, i + MENU_ITEMS_PANE_NAME);
prefix = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX);
@@ -1033,7 +1033,7 @@
struct image *img;
Lisp_Object image;
Lisp_Object helpObj;
- char *helpText;
+ const char *helpText;
/* If image is a vector, choose the image according to the
button state. */
@@ -1153,7 +1153,7 @@
}
- (void) addDisplayItemWithImage: (EmacsImage *)img idx: (int)idx
- helpText: (char *)help enabled: (BOOL)enabled
+ helpText: (const char *)help enabled: (BOOL)enabled
{
/* 1) come up w/identifier */
NSString *identifier
=== modified file 'src/nsterm.h'
--- a/src/nsterm.h 2010-08-06 11:04:29 +0000
+++ b/src/nsterm.h 2010-08-11 08:58:56 +0000
@@ -114,10 +114,10 @@
- initWithTitle: (NSString *)title frame: (struct frame *)f;
- (void)setFrame: (struct frame *)f;
- (void)menuNeedsUpdate: (NSMenu *)menu; /* (delegate method) */
-- (NSString *)parseKeyEquiv: (char *)key;
+- (NSString *)parseKeyEquiv: (const char *)key;
- (NSMenuItem *)addItemWithWidgetValue: (void *)wvptr;
- (void)fillWithWidgetValue: (void *)wvptr;
-- (EmacsMenu *)addSubmenuWithTitle: (char *)title forFrame: (struct frame *)f;
+- (EmacsMenu *)addSubmenuWithTitle: (const char *)title forFrame: (struct
frame *)f;
- (void) clear;
- (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f
keymaps: (int)keymaps;
@@ -144,7 +144,7 @@
- (void) clearActive;
- (BOOL) changed;
- (void) addDisplayItemWithImage: (EmacsImage *)img idx: (int)idx
- helpText: (char *)help
+ helpText: (const char *)help
enabled: (BOOL)enabled;
/* delegate methods */
- (NSToolbarItem *)toolbar: (NSToolbar *)toolbar
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r101048: Use const char* for -Wwrite_strings.,
Jan D <=