Branch: Tag:

2003-12-10

2003-12-10 14:36:14 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Support for MacOS X.

Rev: lib/modules/Stdio.pmod/Terminfo.pmod:1.19

1: - // $Id: Terminfo.pmod,v 1.18 2003/08/07 14:25:50 nilsson Exp $ + // $Id: Terminfo.pmod,v 1.19 2003/12/10 14:36:14 grubba Exp $   #pike __REAL_VERSION__      
657:    {    if (!dirname)    { -  foreach (({"/usr/share/lib/terminfo", "/usr/share/termcap", +  foreach (({"/usr/share/lib/terminfo", "/usr/share/terminfo", +  "/usr/share/termcap",    "/usr/lib/terminfo", "/usr/share/misc/terminfo"}), string dn)    {    .Stat s = file_stat(dn);
715:    LOCK;    if (!(ti = cache[term]))    { -  if (file_stat(dir+term[..0]+"/"+term)) +  if (file_stat(dir+term[..0]+"/"+term)) { +  // Traditional Terminfo layout.    ti = Terminfo(dir+term[..0]+"/"+term); -  +  } else if (file_stat(sprintf("%s%02x/%s", dir, term[0], term))) { +  // MacOS X Terminfo layout. +  ti = Terminfo(sprintf("%s%02x/%s", dir, term[0], term)); +  }    if (ti)    cache[term] = ti;    }