[Python-checkins] CVS: python/dist/src/Doc/tools node2label.pl,1.9,1.9.4.1

Fred L. Drake fdrake@weyr.cnri.reston.va.us
Wed, 1 Mar 2000 15:27:01 -0500 (EST)


Update of /projects/cvsroot/python/dist/src/Doc/tools
In directory weyr:/home/fdrake/projects/python/Doc-152p2/tools

Modified Files:
      Tag: release152p1-patches
	node2label.pl 
Log Message:

Small change to be less destructive.  Longer URLs will be visible to
the user (we never get rid of the #SECTION..... fragment identifier),
but sub-page targetting will work better.  This makes more sense for
the internal navigation, which otherwise broke in the few places that
used \subsubsection markup.

This was reported by Peter Funk <pf@artcom-gmbh.de>.


Index: node2label.pl
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Doc/tools/node2label.pl,v
retrieving revision 1.9
retrieving revision 1.9.4.1
diff -C2 -r1.9 -r1.9.4.1
*** node2label.pl	1999/02/10 17:08:00	1.9
--- node2label.pl	2000/03/01 20:26:58	1.9.4.1
***************
*** 42,46 ****
  	$label = $nodes{$node};
  	if (s/(HREF|href)=\"$node([\#\"])/$1=\"$label.html$2/g) {
! 	  s/(HREF|href)=\"$label.html#(l2h-)?SECTION\d+/$1=\"$label.html/g;
  	  $newnames{$node} = "$label.html";
  	}
--- 42,46 ----
  	$label = $nodes{$node};
  	if (s/(HREF|href)=\"$node([\#\"])/$1=\"$label.html$2/g) {
! 	  s/(HREF|href)=\"$label.html/href=\"$label.html/g;
  	  $newnames{$node} = "$label.html";
  	}



Return-Path: <gward@newcnri.cnri.reston.va.us>
Delivered-To: python-checkins@python.org
Received: from cnri.reston.va.us (ns.CNRI.Reston.VA.US [132.151.1.1])
	by dinsdale.python.org (Postfix) with ESMTP id 945871CEA8
	for <python-checkins@python.org>; Wed,  1 Mar 2000 16:50:08 -0500 (EST)
Received: from newcnri.cnri.reston.va.us (newcnri [132.151.1.84])
	by cnri.reston.va.us (8.9.1a/8.9.1) with ESMTP id QAA27036
	for <python-checkins@python.org>; Wed, 1 Mar 2000 16:50:09 -0500 (EST)
Received: from thrak.cnri.reston.va.us (thrak.cnri.reston.va.us [10.27.10.43])
	by newcnri.cnri.reston.va.us (8.9.1b+Sun/8.9.1) with ESMTP id QAA11852
	for <python-checkins@python.org>; Wed, 1 Mar 2000 16:52:00 -0500 (EST)
Received: (from gward@localhost)
	by thrak.cnri.reston.va.us (8.8.8+Sun/8.8.8) id QAA24075
	for python-checkins@python.org; Wed, 1 Mar 2000 16:51:59 -0500 (EST)
Date: Wed, 1 Mar 2000 16:51:59 -0500 (EST)
From: Greg Ward <gward@cnri.reston.va.us>
Message-Id: <200003012151.QAA24075@thrak.cnri.reston.va.us>
To: python-checkins@python.org
Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.125,2.126
Sender: python-checkins-admin@python.org
Errors-To: python-checkins-admin@python.org
X-BeenThere: python-checkins@python.org
X-Mailman-Version: 1.2 (beta 1)
Precedence: bulk
List-Id: Check-in messages from the Python maintainers <python-checkins.python.org>

Update of /projects/cvsroot/python/dist/src/Modules
In directory thrak:/scratch/python/src/Modules

Modified Files:
	posixmodule.c 
Log Message:
Second attempt to fix the ctermid_r/tmpnam_r warnings: define USE_CTERMID_R 
and USE_TMPNAM_R at the top of the file and refer to them later; this
catches a second reference to 'tmpnam_r' that I didn't spot first time around.

Index: posixmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.125
retrieving revision 2.126
diff -C2 -r2.125 -r2.126
*** posixmodule.c	2000/03/01 18:59:47	2.125
--- posixmodule.c	2000/03/01 21:51:56	2.126
***************
*** 275,278 ****
--- 275,288 ----
  #endif /* UNION_WAIT */
  
+ /* Don't use the "_r" form if we don't need it (also, won't have a
+    prototype for it, at least on Solaris -- maybe others as well?). */
+ #if defined(HAVE_CTERMID_R) && defined(WITH_THREAD)
+ #define USE_CTERMID_R
+ #endif
+ 
+ #if defined(HAVE_TMPNAM_R) && defined(WITH_THREAD)
+ #define USE_TMPNAM_R
+ #endif
+ 
  /* Return a dictionary corresponding to the POSIX environment table */
  
***************
*** 650,654 ****
  		return NULL;
  
! #if defined(HAVE_CTERMID_R) && defined(WITH_THREAD)
  	ret = ctermid_r(buffer);
  #else
--- 660,664 ----
  		return NULL;
  
! #ifdef USE_CTERMID_R
  	ret = ctermid_r(buffer);
  #else
***************
*** 3343,3347 ****
      if (!PyArg_ParseTuple(args, ":tmpnam"))
          return NULL;
! #if defined(HAVE_TMPNAM_R) && defined(WITH_THREAD)
      name = tmpnam_r(buffer);
  #else
--- 3353,3357 ----
      if (!PyArg_ParseTuple(args, ":tmpnam"))
          return NULL;
! #ifdef USE_TMPNAM_R
      name = tmpnam_r(buffer);
  #else
***************
*** 3351,3355 ****
          PyErr_SetObject(PyExc_OSError,
                          Py_BuildValue("is", 0,
! #ifdef HAVE_TMPNAM_R
                                        "unexpected NULL from tmpnam_r"
  #else
--- 3361,3365 ----
          PyErr_SetObject(PyExc_OSError,
                          Py_BuildValue("is", 0,
! #ifdef USE_TMPNAM_R
                                        "unexpected NULL from tmpnam_r"
  #else