[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: virtual hosts



Matthew Wilcox <willy@debian.org> writes:

> On Tue, May 13, 2003 at 12:05:35PM +0200, David N. Welton wrote:
> > davidw@dedasys.com (David N. Welton) writes:

> > > How about just Include'ing it first?  When thinking more about
> > > things... you *could* have a hostname like 007bondfan.com or
> > > something, so giving 'default' its own include would remove any
> > > doubts.

> > Thom rightly points out that under the current system, just
> > Including' it beforehand would Include it twice.  Hrm.

> Is the sort guaranteed to be done in ASCII order?  If so, prefixing
> with a ! will get it in first since ! isn't a valid character in a
> hostname.  If the sort order is LC_COLLATE dependent then we're
> buggered.

It's sorted like so:

            qsort((void *) candidates->elts, candidates->nelts,
                  sizeof(fnames), fname_alphasort);

...

static int fname_alphasort(const void *fn1, const void *fn2)
{
    const fnames *f1 = fn1;
    const fnames *f2 = fn2;

    return strcmp(f1->fname,f2->fname);
}

So I guess we should be ok.  Are there any other characters that are
less meaningful in shell terms?  @ or + maybe?  Still feels kind of
dirty to me.  Oh well...

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
     Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
   Apache Tcl: http://tcl.apache.org/



Reply to: