~ubuntu-branches/ubuntu/saucy/nano/saucy

« back to all changes in this revision

Viewing changes to src/global.c

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach
  • Date: 2009-12-01 20:59:14 UTC
  • mfrom: (1.2.5 upstream) (17.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20091201205914-k0hydhsoysp7tahr
Tags: 2.2.0-1
* The "Televisió Sense Fronteres" release.
* New upstream stable release!
* Remove patch 10_tinybuildfix, applied upstream.
* Update 01_manpage_hyphens, as it's been applied only partially upstream.
* Remove French manpages from nano, until they are back in sync with the
  original versions (§12.1, Policy 3.8.3).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: global.c 4408 2009-09-03 23:29:14Z astyanax $ */
 
1
/* $Id: global.c 4449 2009-11-29 06:24:10Z astyanax $ */
2
2
/**************************************************************************
3
3
 *   global.c                                                             *
4
4
 *                                                                        *
66
66
         * messages, the statusbar prompt, and a list of shortcuts. */
67
67
int editwinrows = 0;
68
68
        /* How many rows does the edit window take up? */
 
69
int maxrows = 0;
 
70
        /* How many usable lines are there (due to soft wrapping) */
69
71
 
70
72
filestruct *cutbuffer = NULL;
71
73
        /* The buffer where we store cut text. */
212
214
}
213
215
 
214
216
/* Set type of function based on the string */
215
 
function_type strtokeytype(char *str)
 
217
function_type strtokeytype(const char *str)
216
218
{
217
219
    if (str[0] ==  'M' || str[0] == 'm')
218
220
        return META;
287
289
 
288
290
/* Add a string to the new shortcut list implementation
289
291
   Allows updates to existing entries in the list */
290
 
void add_to_sclist(int menu, char *scstring, short func, int toggle, int execute)
 
292
void add_to_sclist(int menu, const char *scstring, short func, int toggle, int execute)
291
293
{
292
294
    sc *s;
293
295
 
313
315
    s->type = strtokeytype(scstring);
314
316
    s->menu = menu;
315
317
    s->toggle = toggle;
316
 
    s->keystr = scstring;
 
318
    s->keystr = (char *) scstring;
317
319
    s->scfunc = func;
318
320
    s->execute = execute;
319
321
    assign_keyinfo(s);
409
411
 
410
412
 
411
413
/* Stuff we need to make at least static here so we can access it below */
 
414
/* TRANSLATORS: Try to keep the next five strings at most 10 characters. */
412
415
const char *cancel_msg = N_("Cancel");
 
416
const char *replace_msg = N_("Replace");
 
417
const char *no_replace_msg = N_("No Replace");
413
418
 
414
419
#ifndef NANO_TINY
415
420
const char *case_sens_msg = N_("Case Sens");
445
450
/* TRANSLATORS: Try to keep the next five strings at most 10 characters. */
446
451
const char *prev_history_msg = N_("PrevHstory");
447
452
const char *next_history_msg = N_("NextHstory");
448
 
const char *replace_msg = N_("Replace");
449
 
const char *no_replace_msg = N_("No Replace");
450
453
const char *gototext_msg = N_("Go To Text");
451
454
/* TRANSLATORS: Try to keep the next three strings at most 12 characters. */
452
455
const char *whereis_next_msg = N_("WhereIs Next");
488
491
    const char *fulljstify_msg = N_("FullJstify");
489
492
#endif
490
493
    const char *refresh_msg = N_("Refresh");
 
494
#ifndef NANO_TINY
491
495
    const char *insert_file_msg =  N_("Insert File");
 
496
#endif
492
497
    const char *go_to_line_msg = N_("Go To Line");
493
498
 
494
499
#ifndef DISABLE_JUSTIFY
1342
1347
#ifndef NANO_TINY
1343
1348
/* Now lets come up with a single (hopefully)
1344
1349
   function to get a string for each flag */
1345
 
char *flagtostr(int flag)
 
1350
const char *flagtostr(int flag)
1346
1351
{
1347
1352
   switch (flag) {
1348
1353
        case NO_HELP: