From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from nm21.bullet.mail.bf1.yahoo.com (nm21.bullet.mail.bf1.yahoo.com [98.139.212.180]); by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id 59684e84; for ; Fri, 3 Apr 2015 07:02:22 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.au; s=s2048; t=1428062539; bh=g6C4P+ag9qTZCGfZcyXUDy76M9It+rwRKxSRa/b1iXs=; h=Date:From:To:Subject:From:Subject; b=B+zpycuv+sPquZGUsxl7cxf1nTPkk/kufuASBXJ7AqM/gVbZD1hkC5Kpn+0ZZTPyN0XQPWIw/vOGY2HgsPMOdPfpNKcA2wZauC4KmJIE4/rjJ90RP8oaSTKgMHNeBRYQCT82yT5p5bvUiJIR1qT4Hf+hrM7RzFEiGl/ybXnR6bWMt0+Mrq3DejaZzS4gOZEUQRp0X9Xa+KBiwLLuQ6MQcH3cE5XdxuCMw7BDG/MtmNNMBb//APwwzm6gnNXKeJ2axmpnBjGzixyInlPTX8HSxH3F8BNh1BKF+SVdj/YTfUvjaibfySv6dMPaq1WN4lgyL6VluJQ03FNLZUBslY5fkw== Received: from [66.196.81.172] by nm21.bullet.mail.bf1.yahoo.com with NNFMP; 03 Apr 2015 12:02:19 -0000 Received: from [68.142.230.78] by tm18.bullet.mail.bf1.yahoo.com with NNFMP; 03 Apr 2015 12:02:19 -0000 Received: from [127.0.0.1] by smtp235.mail.bf1.yahoo.com with NNFMP; 03 Apr 2015 12:02:19 -0000 X-Yahoo-Newman-Id: 643119.83704.bm@smtp235.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: sUhRIBcVM1mO5bbu9G3OkOrfbgGyKPMQIxKXQMMenhNHC3q QEem_MVm4iYPvf3efwES6JAPA9zeID7cr2Vf3.B9xMQ1oDDQxOYJVEl5dphf RIXHYlKO2ZkbPbZqBT6a9gIScK95LBOOZafCz8NnAI4FByYnzfNG_zP1afhI e0WodL027vvDRHlfuJd0JL4xRwGOxg2eAVAjIGtpt5nQjv8ZpzYQrjjw2N4Z 1ttAb7jO.Piuk_Nc_7Hy8Fg6f1UFIsnKeLqsZcWV0.KLD03OhgaWgRmroLff D38cqfuMsRThJZuo0HOrXZYlNHJecyDnWivuLf6Z0cuLg2nSLw95ZlCVH2nq L9cVyH1IZtNeiKcKJqXe03K3LRl0wFg6vVJyzus1VWnSQtJEvhqVbimwG1s6 Ng6v0ks3gs7_E46ziKPTI3aCVZtubfYigNLZfikKwASyChXdBYlXOOqGZ6IG HMnGjdE.dYa3RyWCcoOwROgYD2q1noVtAipmIqFBg.GIFEkUdrYySAFFF6.d G2BS5HYsG8lV5QFfHcHbvyqcV5DDAiSk- X-Yahoo-SMTP: wy_7AdSswBBaijFlmVnVzTL.0g-- Message-ID: <551E8148.7070004@yahoo.com.au> Date: Fri, 03 Apr 2015 23:02:16 +1100 From: Peter Bray User-Agent: Mozilla/5.0 (X11; SunOS i86pc; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 To: discuss@mdocml.bsd.lv Subject: Solaris 10 regcomp() does not handle simple whatis query Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Greetings, I am having trouble viewing the GMAME web archive of the mailing list, so please excuse me if this post is a repeat of a known issue. I was investigating mdocml on a Solaris 10 (X86_64) system and discovered that the latest release does not compile, but the latest CVS 2015-04-01 does :-) Many thanks to those responsible! Using the configure.local shown at the end of this message, I was able to build and use mdocml ;-) My testing shows that Solaris 10's regcomp() can not handle the character class used by mdocml's whatis(1): for example: the query 'whatis' generates "[[:<:]]whatis[[:>:]]" which gives the error "regcomp: invalid character class type", as shown below makewhatis /pkgs/64-bit/release/mdocml-cvs_2014_04_01-basic/share/man whatis -M /pkgs/64-bit/release/mdocml-cvs_2014_04_01-basic/share/man whatis regcomp: invalid character class type usage: whatis [-acfhklw] [-C file] [-M path] [-m path] [-O outkey] [-S arch] [-s section] name ... apptrace whatis -M /pkgs/64-bit/release/mdocml-cvs_2014_04_01-basic/share/man whatis ...... -> whatis -> libc.so.1:int vasprintf(char ** = 0xfffffd7fffdfdcf8, const char * = 0x45951e "[[:<:]]%s[[:>:]]", struct __va_list_tag * = 0xfffffd7fffdfdbf0) <- whatis -> libc.so.1:vasprintf() = 0x14 -> whatis -> libc.so.1:int regcomp(regex_t * = 0x47fd10, const char * = 0x47fd90 "[[:<:]]whatis[[:>:]]", int = 0x7) <- whatis -> libc.so.1:regcomp() = 0xd -> whatis -> libc.so.1:void free(void * = 0x47fd90) <- whatis -> libc.so.1:free() -> whatis -> libc.so.1:size_t regerror(int = 0xd, const regex_t * = 0x47fd10, char * = 0xfffffd7fffdfdd00 "......", size_t = 0x400) <- whatis -> libc.so.1:regerror() = 0x1d -> whatis -> libc.so.1:int fprintf(FILE * = 0x47b980, const char * = 0x459537 "regcomp: %s ") regcomp: invalid character class type ...... This is from mansearch.c's exprterm() 756 static struct expr * 757 exprterm(const struct mansearch *search, char *buf, int cs) 758 { ... 777 /* 778 * Separate macro keys from search string. 779 * If needed, request regular expression handling 780 * by setting e->substr to NULL. 781 */ 782 783 if (search->argmode == ARG_WORD) { 784 e->bits = TYPE_Nm; 785 e->substr = NULL; 786 mandoc_asprintf(&val, "[[:<:]]%s[[:>:]]", buf); 787 cs = 0; Depending on the complexity, maybe a BSD version of regcomp() could be included with mdocml, to get the desired functionality and not have to reduce the functionality currently available to mdocml users. Alternatively, the code could make exceptions for broken (by the project's standards) regcomp() implementations. Regards, Peter Bray Sydney, Australia # Local Configuration Options cat configure.local PREFIX="/pkgs/64-bit/release/mdocml-cvs_2014_04_01-basic" MANDIR="${PREFIX}/share/man" INSTALL="ginstall" DBLIB="-L/pkgs/64-bit/lib -lsqlite3" CFLAGS="${CFLAGS} -I/pkgs/64-bit/include" MANPATH_DEFAULT="/pkgs/64-bit/man:/pkgs/64-bit/share/man:/pkgs/man:/pkgs/share/man:/usr/share/man" # roff.7 conflicts with groff's version, make all section 7 manual entries unique MANM_MAN="mandoc_man" # default is "man" MANM_MDOC="mandoc_mdoc" # default is "mdoc" MANM_ROFF="mandoc_roff" # default is "roff" MANM_EQN="mandoc_eqn" # default is "eqn" MANM_TBL="mandoc_tbl" # default is "tbl" -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv