Ejemplo n.º 1
0
char *format_binding( LYKeymap_t *table, int i )
{
  LYKeymapCode the_key = table[ i ];
  char *buf = 0;
  char *formatted;
  Kcmd *rmap = LYKeycodeToKcmd( the_key );
  if ( rmap && rmap->name && rmap->doc )
  {
    formatted = pretty_html( i + -1 );
    if ( formatted )
    {
      HTSprintf0( &buf, "%-*s %-13s %s\n", 11, formatted, rmap->name );
      return buf;
    }
  }
  return 0;
}
Ejemplo n.º 2
0
static char *format_binding(LYKeymap_t *table, int i)
{
    LYKeymap_t the_key = table[i];
    char *buf = 0;
    char *formatted;
    Kcmd *rmap = LYKeycodeToKcmd((LYKeymapCode) the_key);

    if (rmap != 0
	&& rmap->name != 0
	&& rmap->doc != 0
	&& (formatted = pretty_html(i - 1)) != 0) {
	HTSprintf0(&buf, "%-*s %-13s %s\n",
		   PRETTY_LEN, formatted,
		   rmap->name,
		   rmap->doc);
	return buf;
    }
    return 0;
}