The R Project SVN R

Rev

Rev 45017 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 45017 Rev 45067
Line 137... Line 137...
137
    /* handle a couple of special cases first */
137
    /* handle a couple of special cases first */
138
    if (! string_diff(name, "Cut"))  search[dest++] = 't';
138
    if (! string_diff(name, "Cut"))  search[dest++] = 't';
139
    if (! string_diff(name, "Exit")) search[dest++] = 'x';
139
    if (! string_diff(name, "Exit")) search[dest++] = 'x';
140
    if (! string_diff(name, "?")) search[dest++] = '?';
140
    if (! string_diff(name, "?")) search[dest++] = '?';
141
 
141
 
142
    if(MB_CUR_MAX == 1) {
142
    {
143
	/* If there is an '&' in the string, use the next letter first */
143
	/* If there is an '&' in the string, use the next letter first */
144
	char *p = strchr(name, '&');
144
	char *p = strchr(name, '&');
145
	if (p && *(p+1)) search[dest++] = *(p+1);
145
	if (p && *(p+1)) search[dest++] = *(p+1);
146
    }
146
    }
147
 
147
 
Line 264... Line 264...
264
	    buf[dest++] = name[source];
264
	    buf[dest++] = name[source];
265
    }
265
    }
266
    else /* no shortcut key, just copy the name string except '&' */
266
    else /* no shortcut key, just copy the name string except '&' */
267
    {
267
    {
268
	for (source = 0; name[source]; source++)
268
	for (source = 0; name[source]; source++)
269
	    if(MB_CUR_MAX == 1 && name[source] != '&')
-
 
270
		buf[dest++] = name[source];
269
	    if(name[source] != '&') buf[dest++] = name[source];
271
    }
270
    }
272
 
271
 
273
    if (key) {
272
    if (key) {
274
	for (source=0; extra[source]; source++)
273
	for (source=0; extra[source]; source++)
275
	    buf[dest++] = extra[source];
274
	    buf[dest++] = extra[source];