~silwol/freenukum/trunk

« back to all changes in this revision

Viewing changes to src/fn_menu.c

  • Committer: Wolfgang Silbermayr
  • Date: 2009-02-19 07:53:17 UTC
  • Revision ID: wolfgang@silbermayr.at-20090219075317-yvff1vfn2lkcu2u0
fntile basically integrated into backdrop loading

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
/* --------------------------------------------------------------- */
40
40
 
41
 
#define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
 
41
#define MAXVAL(X,Y) ((X) > (Y) ? (X) : (Y))
42
42
 
43
43
/* --------------------------------------------------------------- */
44
44
 
118
118
 
119
119
  fn_msgbox_get_text_information(menu->text, &textcols, &textrows);
120
120
 
121
 
  textcols = MAX(textcols, menu->width);
 
121
  textcols = MAXVAL(textcols, menu->width);
122
122
 
123
123
  char * placeholder =
124
124
    malloc((menu->num_entries + textrows) * textcols + 4);
355
355
{
356
356
  fn_menuentry_t * entry = fn_menuentry_create(shortcut, name, value); 
357
357
 
358
 
  menu->width = MAX(menu->width, strlen(name));
 
358
  menu->width = MAXVAL(menu->width, strlen(name));
359
359
 
360
360
  menu->entries = fn_list_append(menu->entries, entry);
361
361
  menu->num_entries++;