[BACK]Return to test-getsubopt.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/test-getsubopt.c between version 1.3 and 1.5

version 1.3, 2014/08/17 20:53:50 version 1.5, 2018/08/15 02:15:52
Line 15 
Line 15 
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */   */
   
 #if defined(__linux__) || defined(__MINT__)  
 #define _GNU_SOURCE /* getsubopt() */  
 #endif  
   
 #include <stdlib.h>  #include <stdlib.h>
   
   /*
    * NetBSD declares this function in the wrong header.
    * No harm is done by allowing that, too:
    * The only file using it, main.c, also includes unistd.h, anyway.
    */
   #include <unistd.h>
   
 int  int
 main(void)  main(void)
 {  {
Line 29  main(void)
Line 32  main(void)
         char token0[] = "k";          char token0[] = "k";
         char *const tokens[] = { token0, NULL };          char *const tokens[] = { token0, NULL };
         char *value = NULL;          char *value = NULL;
         return( ! (0 == getsubopt(&options, tokens, &value)          return ! (getsubopt(&options, tokens, &value) == 0
             && value == buf+2 && options == buf+3));              && value == buf+2 && options == buf+3);
 }  }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

CVSweb