Staging
v0.5.1
https://github.com/python/cpython
Revision 9c1696cff55375744281580438fe29d44de04397 authored by Barry Warsaw on 15 December 1998, 04:36:22 UTC, committed by Barry Warsaw on 15 December 1998, 04:36:22 UTC
string we find ourselves in, based on the passed in delimiter.

(py-compute-indentation): Fixes for indentation errors when we land
inside a triple quoted string.  For example:

def foo():
   if os.path.isfile(o_pri_mbox_file) and os.path.isfile(o_pub_mbox_file):
       print """\
I found both a private and a public mbox archive file
    private: %s
    public : %s

I won't move either file, but you should choose one and move it to

    %s

You may want to merge them manually, but be careful about exposing private
correspondences to the public.""" % (
    o_pri_mbox_file, o_pub_mbox_file, mbox_file)
*----indentation would be wrong on this line.
1 parent ef30092
Raw File
Tip revision: 9c1696cff55375744281580438fe29d44de04397 authored by Barry Warsaw on 15 December 1998, 04:36:22 UTC
(py-goto-beginning-of-tqs): Finds the beginning of the triple quoted
Tip revision: 9c1696c
mwerksglue.c
/*
** Glue code for MetroWerks CodeWarrior, which misses
** unix-like routines for file-access.
*/

#ifdef __MWERKS__
#include <Types.h>
#include <Files.h>
#include <Strings.h>

#include <stdio.h>
#include <errno.h>

int
fileno(fp)
	FILE *fp;
{
	if (fp==stdin) return 0;
	else if (fp==stdout) return 1;
	else if (fp==stderr) return 2;
	else return 3;
}

int
isatty(fd)
	int fd;
{
	return (fd >= 0 && fd <= 2);
}

int
unlink(old)
	char *old;
{
	OSErr err;
	
	if ((err=FSDelete(c2pstr(old), 0)) == noErr)
		return 0;
	errno= err;
	return -1;
}

#endif /* __MWERKS__ */
back to top