Changeset 706597e in git


Ignore:
Timestamp:
Mar 18, 2014, 7:04:09 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
78d77686cc4b5fc9f6f797bc4ca23dc1ca4c751cb4ccb21068b8fec038ce45006522ec978dbf8324
Parents:
789a7e93154cff0756258fc1aea3331cb78f20a8
Message:
add: extend readline completion to all ring-indep. names
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/feread.cc

    r789a7e r706597e  
    5151*   start at the top of the list.
    5252*/
     53#include <Singular/ipid.h>
    5354extern "C"
    5455char *command_generator (char *text, int state)
    5556{
    5657  static int list_index, len;
    57   char *name;
     58  static idhdl h;
     59  const char *name;
    5860
    5961  /* If this is a new word to complete, initialize now.  This includes
     
    6466    list_index = 1;
    6567    len = strlen (text);
     68    h=basePack->idroot;
    6669  }
    6770
     
    7477      return (strdup(name));
    7578  }
    76 
     79  if (len>1)
     80  {
     81    while (h!=NULL)
     82    {
     83      name=h->id;
     84      h=h->next;
     85      if (strncmp (name, text, len) == 0)
     86        return (strdup(name));
     87    }
     88  }
    7789  /* If no names matched, then return NULL. */
    7890  return ((char *)NULL);
Note: See TracChangeset for help on using the changeset viewer.