checking in all the old panacean stuff

This commit is contained in:
2016-07-25 15:42:39 -04:00
parent c996cdd81f
commit 8fd9e44ae5
1210 changed files with 220657 additions and 0 deletions

8
puttysrc/MACOSX/INFO.PLI Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIconFile</key>
<string>PuTTY.icns</string>
</dict>
</plist>

879
puttysrc/MACOSX/MAKEFILE Normal file
View File

@@ -0,0 +1,879 @@
# Makefile for putty under Mac OS X.
#
# This file was created by `mkfiles.pl' from the `Recipe' file.
# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.
#
# Extra options you can set:
#
# - VER="-DSNAPSHOT=1999-01-25 -DSVN_REV=1234"
# Generates executables whose About box report them as being a
# development snapshot. SVN_REV is a Subversion revision number.
#
# - VER=-DRELEASE=0.43
# Generates executables whose About box report them as being a
# release version.
#
# - COMPAT=-DAUTO_WINSOCK (Windows only)
# Causes PuTTY to assume that <windows.h> includes its own WinSock
# header file, so that it won't try to include <winsock.h>.
#
# - COMPAT=-DWINSOCK_TWO (Windows only)
# Causes the PuTTY utilities to include <winsock2.h> instead of
# <winsock.h>, except Plink which _needs_ WinSock 2 so it already
# does this.
#
# - COMPAT=-DNO_SECURITY (Windows only)
# Disables Pageant's use of <aclapi.h>, which is not available
# with some development environments (such as older versions of
# the Cygwin/mingw GNU toolchain). This means that Pageant
# won't care about the local user ID of processes accessing it; a
# version of Pageant built with this option will therefore refuse
# to run under NT-series OSes on security grounds (although it
# will run fine on Win95-series OSes where there is no access
# control anyway).
#
# - COMPAT=-DNO_MULTIMON (Windows only)
# Disables PuTTY's use of <multimon.h>, which is not available
# with some development environments. This means that PuTTY's
# full-screen mode (configurable to work on Alt-Enter) will
# not behave usefully in a multi-monitor environment.
#
# Note that this definition is always enabled in the Cygwin
# build, since at the time of writing this <multimon.h> is
# known not to be available in Cygwin.
#
# - COMPAT=-DNO_HTMLHELP (Windows only)
# Disables PuTTY's use of <htmlhelp.h>, which is not available
# with some development environments. The resulting binary
# will only look for an old-style WinHelp file (.HLP/.CNT), and
# will ignore any .CHM file.
#
# Note that this definition is always enabled in the Cygwin
# build, since at the time of writing this <htmlhelp.h> is
# known not to be available in Cygwin (although you can use
# the htmlhelp.h supplied with HTML Help Workshop).
#
# - RCFL=-DNO_MANIFESTS (Windows only)
# Disables inclusion of XML application manifests in the PuTTY
# binaries. This may be necessary to build for 64-bit Windows;
# the manifests are only included to use the XP GUI style on
# Windows XP, and the architecture tags are a lie on 64-bit.
#
# - COMPAT=-DNO_IPV6
# Disables PuTTY's ability to make IPv6 connections, enabling
# it to compile under development environments which do not
# support IPv6 in their header files.
#
# - COMPAT=-DMSVC4 (Windows only)
# - RCFL=-DMSVC4
# Makes a couple of minor changes so that PuTTY compiles using
# MSVC 4. You will also need -DNO_SECURITY and -DNO_MULTIMON.
#
# - RCFL=-DASCIICTLS (Windows only)
# Uses ASCII rather than Unicode to specify the tab control in
# the resource file. Probably most useful when compiling with
# Cygnus/mingw32, whose resource compiler may have less of a
# problem with it.
#
# - XFLAGS=-DTELNET_DEFAULT
# Causes PuTTY to default to the Telnet protocol (in the absence
# of Default Settings and so on to the contrary). Normally PuTTY
# will default to SSH.
#
# - XFLAGS=-DDEBUG
# Causes PuTTY to enable internal debugging.
#
# - XFLAGS=-DMALLOC_LOG
# Causes PuTTY to emit a file called putty_mem.log, logging every
# memory allocation and free, so you can track memory leaks.
#
# - XFLAGS=-DMINEFIELD (Windows only)
# Causes PuTTY to use a custom memory allocator, similar in
# concept to Electric Fence, in place of regular malloc(). Wastes
# huge amounts of RAM, but should cause heap-corruption bugs to
# show up as GPFs at the point of failure rather than appearing
# later on as second-level damage.
#
CC = $(TOOLPATH)gcc
CFLAGS = -O2 -Wall -Werror -g -I.././ -I../charset/ -I../windows/ -I../unix/ \
-I../mac/ -I../macosx/
MLDFLAGS = -framework Cocoa
ULDFLAGS =
CFLAGS += -DMACOSX
all: PuTTY plink pscp psftp puttygen
PuTTY.app:
mkdir -p $@
PuTTY.app/Contents: PuTTY.app
mkdir -p $@
PuTTY.app/Contents/MacOS: PuTTY.app/Contents
mkdir -p $@
PuTTY.app/Contents/Resources: PuTTY.app/Contents
mkdir -p $@
PuTTY.app/Contents/Resources/PuTTY.icns: PuTTY.app/Contents/Resources putty.icns
cp putty.icns $@
PuTTY.app/Contents/Info.plist: PuTTY.app/Contents/Resources info.plist
cp info.plist $@
PuTTY: PuTTY.app/Contents/MacOS/PuTTY \
PuTTY.app/Contents/Resources/PuTTY.icns \
PuTTY.app/Contents/Info.plist $(PuTTY_extra)
PuTTY.app/Contents/MacOS/PuTTY: PuTTY.app/Contents/MacOS be_all_s.o config.o \
cproxy.o dialog.o fromucs.o ldisc.o ldiscucs.o localenc.o \
logging.o macenc.o mimeenc.o minibidi.o misc.o osxctrls.o \
osxdlg.o osxmain.o osxsel.o osxwin.o pinger.o portfwd.o \
proxy.o raw.o rlogin.o sbcs.o sbcsdat.o sercfg.o settings.o \
slookup.o ssh.o sshaes.o ssharcf.o sshblowf.o sshbn.o \
sshcrc.o sshcrcda.o sshdes.o sshdh.o sshdss.o sshmd5.o \
sshpubk.o sshrand.o sshrsa.o sshsh256.o sshsh512.o sshsha.o \
sshzlib.o telnet.o terminal.o testback.o time.o timing.o \
toucs.o tree234.o utf8.o ux_x11.o uxagentc.o uxcfg.o \
uxmisc.o uxnet.o uxnoise.o uxprint.o uxproxy.o uxpty.o \
uxsel.o uxser.o uxsignal.o uxstore.o uxucs.o version.o \
wcwidth.o wildcard.o x11fwd.o xenc.o
$(CC) $(MLDFLAGS) -o $@ be_all_s.o config.o cproxy.o dialog.o \
fromucs.o ldisc.o ldiscucs.o localenc.o logging.o macenc.o \
mimeenc.o minibidi.o misc.o osxctrls.o osxdlg.o osxmain.o \
osxsel.o osxwin.o pinger.o portfwd.o proxy.o raw.o rlogin.o \
sbcs.o sbcsdat.o sercfg.o settings.o slookup.o ssh.o \
sshaes.o ssharcf.o sshblowf.o sshbn.o sshcrc.o sshcrcda.o \
sshdes.o sshdh.o sshdss.o sshmd5.o sshpubk.o sshrand.o \
sshrsa.o sshsh256.o sshsh512.o sshsha.o sshzlib.o telnet.o \
terminal.o testback.o time.o timing.o toucs.o tree234.o \
utf8.o ux_x11.o uxagentc.o uxcfg.o uxmisc.o uxnet.o \
uxnoise.o uxprint.o uxproxy.o uxpty.o uxsel.o uxser.o \
uxsignal.o uxstore.o uxucs.o version.o wcwidth.o wildcard.o \
x11fwd.o xenc.o
plink: be_all_s.o cmdline.o cproxy.o ldisc.o logging.o misc.o pinger.o \
portfwd.o proxy.o raw.o rlogin.o settings.o ssh.o sshaes.o \
ssharcf.o sshblowf.o sshbn.o sshcrc.o sshcrcda.o sshdes.o \
sshdh.o sshdss.o sshmd5.o sshpubk.o sshrand.o sshrsa.o \
sshsh256.o sshsh512.o sshsha.o sshzlib.o telnet.o time.o \
timing.o tree234.o ux_x11.o uxagentc.o uxcons.o uxmisc.o \
uxnet.o uxnoise.o uxplink.o uxproxy.o uxsel.o uxser.o \
uxsignal.o uxstore.o version.o wildcard.o x11fwd.o
$(CC) $(ULDFLAGS) -o $@ be_all_s.o cmdline.o cproxy.o ldisc.o \
logging.o misc.o pinger.o portfwd.o proxy.o raw.o rlogin.o \
settings.o ssh.o sshaes.o ssharcf.o sshblowf.o sshbn.o \
sshcrc.o sshcrcda.o sshdes.o sshdh.o sshdss.o sshmd5.o \
sshpubk.o sshrand.o sshrsa.o sshsh256.o sshsh512.o sshsha.o \
sshzlib.o telnet.o time.o timing.o tree234.o ux_x11.o \
uxagentc.o uxcons.o uxmisc.o uxnet.o uxnoise.o uxplink.o \
uxproxy.o uxsel.o uxser.o uxsignal.o uxstore.o version.o \
wildcard.o x11fwd.o
pscp: be_none.o cmdline.o cproxy.o int64.o logging.o misc.o pinger.o \
portfwd.o proxy.o pscp.o settings.o sftp.o ssh.o sshaes.o \
ssharcf.o sshblowf.o sshbn.o sshcrc.o sshcrcda.o sshdes.o \
sshdh.o sshdss.o sshmd5.o sshpubk.o sshrand.o sshrsa.o \
sshsh256.o sshsh512.o sshsha.o sshzlib.o time.o timing.o \
tree234.o uxagentc.o uxcons.o uxmisc.o uxnet.o uxnoise.o \
uxproxy.o uxsel.o uxsftp.o uxstore.o version.o wildcard.o \
x11fwd.o
$(CC) $(ULDFLAGS) -o $@ be_none.o cmdline.o cproxy.o int64.o \
logging.o misc.o pinger.o portfwd.o proxy.o pscp.o \
settings.o sftp.o ssh.o sshaes.o ssharcf.o sshblowf.o \
sshbn.o sshcrc.o sshcrcda.o sshdes.o sshdh.o sshdss.o \
sshmd5.o sshpubk.o sshrand.o sshrsa.o sshsh256.o sshsh512.o \
sshsha.o sshzlib.o time.o timing.o tree234.o uxagentc.o \
uxcons.o uxmisc.o uxnet.o uxnoise.o uxproxy.o uxsel.o \
uxsftp.o uxstore.o version.o wildcard.o x11fwd.o
psftp: be_none.o cmdline.o cproxy.o int64.o logging.o misc.o pinger.o \
portfwd.o proxy.o psftp.o settings.o sftp.o ssh.o sshaes.o \
ssharcf.o sshblowf.o sshbn.o sshcrc.o sshcrcda.o sshdes.o \
sshdh.o sshdss.o sshmd5.o sshpubk.o sshrand.o sshrsa.o \
sshsh256.o sshsh512.o sshsha.o sshzlib.o time.o timing.o \
tree234.o uxagentc.o uxcons.o uxmisc.o uxnet.o uxnoise.o \
uxproxy.o uxsel.o uxsftp.o uxstore.o version.o wildcard.o \
x11fwd.o
$(CC) $(ULDFLAGS) -o $@ be_none.o cmdline.o cproxy.o int64.o \
logging.o misc.o pinger.o portfwd.o proxy.o psftp.o \
settings.o sftp.o ssh.o sshaes.o ssharcf.o sshblowf.o \
sshbn.o sshcrc.o sshcrcda.o sshdes.o sshdh.o sshdss.o \
sshmd5.o sshpubk.o sshrand.o sshrsa.o sshsh256.o sshsh512.o \
sshsha.o sshzlib.o time.o timing.o tree234.o uxagentc.o \
uxcons.o uxmisc.o uxnet.o uxnoise.o uxproxy.o uxsel.o \
uxsftp.o uxstore.o version.o wildcard.o x11fwd.o
puttygen: cmdgen.o import.o misc.o notiming.o sshaes.o sshbn.o sshdes.o \
sshdss.o sshdssg.o sshmd5.o sshprime.o sshpubk.o sshrand.o \
sshrsa.o sshrsag.o sshsh512.o sshsha.o time.o tree234.o \
uxcons.o uxgen.o uxmisc.o uxnoise.o uxstore.o version.o
$(CC) $(ULDFLAGS) -o $@ cmdgen.o import.o misc.o notiming.o sshaes.o \
sshbn.o sshdes.o sshdss.o sshdssg.o sshmd5.o sshprime.o \
sshpubk.o sshrand.o sshrsa.o sshrsag.o sshsh512.o sshsha.o \
time.o tree234.o uxcons.o uxgen.o uxmisc.o uxnoise.o \
uxstore.o version.o
be_all.o: ../be_all.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
be_all_s.o: ../be_all_s.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
be_none.o: ../be_none.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
be_nos_s.o: ../be_nos_s.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
be_nossh.o: ../be_nossh.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
cmdgen.o: ../cmdgen.c ../putty.h ../ssh.h ../puttyps.h ../network.h \
../misc.h ../puttymem.h ../int64.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../tree234.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
cmdline.o: ../cmdline.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
config.o: ../config.c ../putty.h ../dialog.h ../storage.h ../puttyps.h \
../network.h ../misc.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
cproxy.o: ../cproxy.c ../putty.h ../ssh.h ../network.h ../proxy.h \
../puttyps.h ../misc.h ../puttymem.h ../int64.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
dialog.o: ../dialog.c ../putty.h ../dialog.h ../puttyps.h ../network.h \
../misc.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
fromucs.o: ../charset/fromucs.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
gtkcfg.o: ../unix/gtkcfg.c ../putty.h ../dialog.h ../storage.h ../puttyps.h \
../network.h ../misc.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
gtkcols.o: ../unix/gtkcols.c ../unix/gtkcols.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
gtkdlg.o: ../unix/gtkdlg.c ../unix/gtkcols.h ../putty.h ../storage.h \
../dialog.h ../tree234.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
gtkwin.o: ../unix/gtkwin.c ../putty.h ../terminal.h ../puttyps.h \
../network.h ../misc.h ../tree234.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
import.o: ../import.c ../putty.h ../ssh.h ../misc.h ../puttyps.h \
../network.h ../puttymem.h ../int64.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../tree234.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
int64.o: ../int64.c ../int64.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
ldisc.o: ../ldisc.c ../putty.h ../terminal.h ../ldisc.h ../puttyps.h \
../network.h ../misc.h ../tree234.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
ldiscucs.o: ../ldiscucs.c ../putty.h ../terminal.h ../ldisc.h ../puttyps.h \
../network.h ../misc.h ../tree234.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
localenc.o: ../charset/localenc.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
logging.o: ../logging.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
mac.o: ../mac/mac.c ../mac/macresid.h ../putty.h ../ssh.h ../terminal.h \
../mac/mac.h ../puttyps.h ../network.h ../misc.h \
../puttymem.h ../int64.h ../tree234.h ../charset/charset.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../windows/winhelp.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
macabout.o: ../mac/macabout.c ../putty.h ../mac/mac.h ../mac/macresid.h \
../puttyps.h ../network.h ../misc.h ../charset/charset.h \
../tree234.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h \
../windows/winhelp.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
macctrls.o: ../mac/macctrls.c ../putty.h ../mac/mac.h ../mac/macresid.h \
../dialog.h ../tree234.h ../puttyps.h ../network.h ../misc.h \
../charset/charset.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h \
../windows/winhelp.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
macdlg.o: ../mac/macdlg.c ../putty.h ../dialog.h ../mac/mac.h \
../mac/macresid.h ../storage.h ../puttyps.h ../network.h \
../misc.h ../charset/charset.h ../tree234.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../windows/winhelp.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
macenc.o: ../charset/macenc.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
macevlog.o: ../mac/macevlog.c ../putty.h ../mac/mac.h ../mac/macresid.h \
../terminal.h ../puttyps.h ../network.h ../misc.h \
../charset/charset.h ../tree234.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../windows/winhelp.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
macmisc.o: ../mac/macmisc.c ../putty.h ../mac/mac.h ../ssh.h ../puttyps.h \
../network.h ../misc.h ../charset/charset.h ../tree234.h \
../puttymem.h ../int64.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../windows/winhelp.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
macnet.o: ../mac/macnet.c ../putty.h ../network.h ../mac/mac.h ../ssh.h \
../puttyps.h ../misc.h ../charset/charset.h ../tree234.h \
../puttymem.h ../int64.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../windows/winhelp.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
macnoise.o: ../mac/macnoise.c ../putty.h ../ssh.h ../storage.h ../puttyps.h \
../network.h ../misc.h ../puttymem.h ../int64.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
macpgen.o: ../mac/macpgen.c ../mac/macpgrid.h ../putty.h ../ssh.h \
../mac/mac.h ../puttyps.h ../network.h ../misc.h \
../puttymem.h ../int64.h ../charset/charset.h ../tree234.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../windows/winhelp.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
macpgkey.o: ../mac/macpgkey.c ../putty.h ../mac/mac.h ../mac/macpgrid.h \
../ssh.h ../puttyps.h ../network.h ../misc.h \
../charset/charset.h ../tree234.h ../puttymem.h ../int64.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../windows/winhelp.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
macstore.o: ../mac/macstore.c ../putty.h ../storage.h ../mac/mac.h \
../mac/macresid.h ../puttyps.h ../network.h ../misc.h \
../charset/charset.h ../tree234.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../windows/winhelp.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
macterm.o: ../mac/macterm.c ../mac/macresid.h ../putty.h \
../charset/charset.h ../mac/mac.h ../terminal.h ../puttyps.h \
../network.h ../misc.h ../tree234.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../windows/winhelp.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
macucs.o: ../mac/macucs.c ../putty.h ../charset/charset.h ../terminal.h \
../misc.h ../mac/mac.h ../puttyps.h ../network.h \
../tree234.h ../puttymem.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../windows/winhelp.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
mimeenc.o: ../charset/mimeenc.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
minibidi.o: ../minibidi.c ../misc.h ../puttymem.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
misc.o: ../misc.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
mtcpnet.o: ../mac/mtcpnet.c ../putty.h ../network.h ../mac/mac.h \
../puttyps.h ../misc.h ../charset/charset.h ../tree234.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../windows/winhelp.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
nocproxy.o: ../nocproxy.c ../putty.h ../network.h ../proxy.h ../puttyps.h \
../misc.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
notiming.o: ../notiming.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
osxctrls.o: ../macosx/osxctrls.m ../putty.h ../dialog.h ../macosx/osxclass.h \
../tree234.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../windows/winhelp.h \
../charset/charset.h
$(CC) -x objective-c $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
osxdlg.o: ../macosx/osxdlg.m ../putty.h ../storage.h ../dialog.h \
../macosx/osxclass.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) -x objective-c $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
osxmain.o: ../macosx/osxmain.m ../putty.h ../macosx/osxclass.h ../puttyps.h \
../network.h ../misc.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) -x objective-c $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
osxsel.o: ../macosx/osxsel.m ../putty.h ../macosx/osxclass.h ../puttyps.h \
../network.h ../misc.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) -x objective-c $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
osxwin.o: ../macosx/osxwin.m ../putty.h ../terminal.h ../macosx/osxclass.h \
../puttyps.h ../network.h ../misc.h ../tree234.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../windows/winhelp.h \
../charset/charset.h
$(CC) -x objective-c $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
otnet.o: ../mac/otnet.c ../putty.h ../network.h ../mac/mac.h ../puttyps.h \
../misc.h ../charset/charset.h ../tree234.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../windows/winhelp.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
pinger.o: ../pinger.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
portfwd.o: ../portfwd.c ../putty.h ../ssh.h ../puttyps.h ../network.h \
../misc.h ../puttymem.h ../int64.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../tree234.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
pproxy.o: ../pproxy.c ../putty.h ../network.h ../proxy.h ../puttyps.h \
../misc.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
proxy.o: ../proxy.c ../putty.h ../network.h ../proxy.h ../puttyps.h \
../misc.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
pscp.o: ../pscp.c ../putty.h ../psftp.h ../ssh.h ../sftp.h ../storage.h \
../int64.h ../puttyps.h ../network.h ../misc.h ../puttymem.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
psftp.o: ../psftp.c ../putty.h ../psftp.h ../storage.h ../ssh.h ../sftp.h \
../int64.h ../puttyps.h ../network.h ../misc.h ../puttymem.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
raw.o: ../raw.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
rlogin.o: ../rlogin.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sbcs.o: ../charset/sbcs.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sbcsdat.o: ../charset/sbcsdat.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sercfg.o: ../sercfg.c ../putty.h ../dialog.h ../storage.h ../puttyps.h \
../network.h ../misc.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
settings.o: ../settings.c ../putty.h ../storage.h ../puttyps.h ../network.h \
../misc.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sftp.o: ../sftp.c ../misc.h ../int64.h ../tree234.h ../sftp.h ../puttymem.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sizetip.o: ../windows/sizetip.c ../putty.h ../puttyps.h ../network.h \
../misc.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
slookup.o: ../charset/slookup.c ../charset/charset.h ../charset/internal.h \
../charset/enum.c ../charset/sbcsdat.c ../charset/utf8.c
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
ssh.o: ../ssh.c ../putty.h ../tree234.h ../ssh.h ../puttyps.h ../network.h \
../misc.h ../puttymem.h ../int64.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshaes.o: ../sshaes.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
ssharcf.o: ../ssharcf.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshblowf.o: ../sshblowf.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshbn.o: ../sshbn.c ../misc.h ../ssh.h ../puttymem.h ../network.h ../int64.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshcrc.o: ../sshcrc.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshcrcda.o: ../sshcrcda.c ../misc.h ../ssh.h ../puttymem.h ../network.h \
../int64.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshdes.o: ../sshdes.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshdh.o: ../sshdh.c ../ssh.h ../puttymem.h ../network.h ../int64.h ../misc.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshdss.o: ../sshdss.c ../ssh.h ../misc.h ../puttymem.h ../network.h \
../int64.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshdssg.o: ../sshdssg.c ../misc.h ../ssh.h ../puttymem.h ../network.h \
../int64.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshmd5.o: ../sshmd5.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshprime.o: ../sshprime.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshpubk.o: ../sshpubk.c ../putty.h ../ssh.h ../misc.h ../puttyps.h \
../network.h ../puttymem.h ../int64.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../tree234.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshrand.o: ../sshrand.c ../putty.h ../ssh.h ../puttyps.h ../network.h \
../misc.h ../puttymem.h ../int64.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../tree234.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshrsa.o: ../sshrsa.c ../ssh.h ../misc.h ../puttymem.h ../network.h \
../int64.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshrsag.o: ../sshrsag.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshsh256.o: ../sshsh256.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshsh512.o: ../sshsh512.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshsha.o: ../sshsha.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
sshzlib.o: ../sshzlib.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
stricmp.o: ../mac/stricmp.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
telnet.o: ../telnet.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
terminal.o: ../terminal.c ../putty.h ../terminal.h ../puttyps.h ../network.h \
../misc.h ../tree234.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
testback.o: ../testback.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
time.o: ../time.c
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
timing.o: ../timing.c ../putty.h ../tree234.h ../puttyps.h ../network.h \
../misc.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
toucs.o: ../charset/toucs.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
tree234.o: ../tree234.c ../puttymem.h ../tree234.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
utf8.o: ../charset/utf8.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
ux_x11.o: ../unix/ux_x11.c ../putty.h ../ssh.h ../puttyps.h ../network.h \
../misc.h ../puttymem.h ../int64.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../tree234.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxagentc.o: ../unix/uxagentc.c ../putty.h ../misc.h ../tree234.h \
../puttymem.h ../puttyps.h ../network.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxcfg.o: ../unix/uxcfg.c ../putty.h ../dialog.h ../storage.h ../puttyps.h \
../network.h ../misc.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxcons.o: ../unix/uxcons.c ../putty.h ../storage.h ../ssh.h ../puttyps.h \
../network.h ../misc.h ../puttymem.h ../int64.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxgen.o: ../unix/uxgen.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxmisc.o: ../unix/uxmisc.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxnet.o: ../unix/uxnet.c ../putty.h ../network.h ../tree234.h ../puttyps.h \
../misc.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxnoise.o: ../unix/uxnoise.c ../putty.h ../ssh.h ../storage.h ../puttyps.h \
../network.h ../misc.h ../puttymem.h ../int64.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxplink.o: ../unix/uxplink.c ../putty.h ../storage.h ../tree234.h \
../puttyps.h ../network.h ../misc.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxprint.o: ../unix/uxprint.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxproxy.o: ../unix/uxproxy.c ../tree234.h ../putty.h ../network.h ../proxy.h \
../puttyps.h ../misc.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxpterm.o: ../unix/uxpterm.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxpty.o: ../unix/uxpty.c ../putty.h ../tree234.h ../puttyps.h ../network.h \
../misc.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxputty.o: ../unix/uxputty.c ../putty.h ../storage.h ../puttyps.h \
../network.h ../misc.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxsel.o: ../unix/uxsel.c ../putty.h ../tree234.h ../puttyps.h ../network.h \
../misc.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxser.o: ../unix/uxser.c ../putty.h ../tree234.h ../puttyps.h ../network.h \
../misc.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxsftp.o: ../unix/uxsftp.c ../putty.h ../psftp.h ../int64.h ../puttyps.h \
../network.h ../misc.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxsignal.o: ../unix/uxsignal.c
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxstore.o: ../unix/uxstore.c ../putty.h ../storage.h ../tree234.h \
../puttyps.h ../network.h ../misc.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
uxucs.o: ../unix/uxucs.c ../putty.h ../charset/charset.h ../terminal.h \
../misc.h ../puttyps.h ../network.h ../tree234.h \
../puttymem.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../windows/winhelp.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
version.o: ../version.c
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
vsnprint.o: ../mac/vsnprint.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
wcwidth.o: ../wcwidth.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
wildcard.o: ../wildcard.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
wincfg.o: ../windows/wincfg.c ../putty.h ../dialog.h ../storage.h \
../puttyps.h ../network.h ../misc.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
wincons.o: ../windows/wincons.c ../putty.h ../storage.h ../ssh.h \
../puttyps.h ../network.h ../misc.h ../puttymem.h ../int64.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
winctrls.o: ../windows/winctrls.c ../putty.h ../misc.h ../dialog.h \
../puttyps.h ../network.h ../puttymem.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
windefs.o: ../windows/windefs.c ../putty.h ../puttyps.h ../network.h \
../misc.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
windlg.o: ../windows/windlg.c ../putty.h ../ssh.h ../windows/win_res.h \
../storage.h ../dialog.h ../puttyps.h ../network.h ../misc.h \
../puttymem.h ../int64.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../tree234.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
window.o: ../windows/window.c ../putty.h ../terminal.h ../storage.h \
../windows/win_res.h ../puttyps.h ../network.h ../misc.h \
../tree234.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
winhandl.o: ../windows/winhandl.c ../putty.h ../puttyps.h ../network.h \
../misc.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
winhelp.o: ../windows/winhelp.c ../putty.h ../puttyps.h ../network.h \
../misc.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
winmisc.o: ../windows/winmisc.c ../putty.h ../puttyps.h ../network.h \
../misc.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
winnet.o: ../windows/winnet.c ../putty.h ../network.h ../tree234.h \
../puttyps.h ../misc.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
winnoise.o: ../windows/winnoise.c ../putty.h ../ssh.h ../storage.h \
../puttyps.h ../network.h ../misc.h ../puttymem.h ../int64.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
winpgen.o: ../windows/winpgen.c ../putty.h ../ssh.h ../puttyps.h \
../network.h ../misc.h ../puttymem.h ../int64.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
winpgnt.o: ../windows/winpgnt.c ../putty.h ../ssh.h ../misc.h ../tree234.h \
../puttyps.h ../network.h ../puttymem.h ../int64.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
winpgntc.o: ../windows/winpgntc.c ../putty.h ../puttyps.h ../network.h \
../misc.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
winplink.o: ../windows/winplink.c ../putty.h ../storage.h ../tree234.h \
../puttyps.h ../network.h ../misc.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
winprint.o: ../windows/winprint.c ../putty.h ../puttyps.h ../network.h \
../misc.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
winproxy.o: ../windows/winproxy.c ../tree234.h ../putty.h ../network.h \
../proxy.h ../puttyps.h ../misc.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
winser.o: ../windows/winser.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
winsftp.o: ../windows/winsftp.c ../putty.h ../psftp.h ../int64.h \
../puttyps.h ../network.h ../misc.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
winstore.o: ../windows/winstore.c ../putty.h ../storage.h ../puttyps.h \
../network.h ../misc.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../puttymem.h ../tree234.h ../windows/winhelp.h \
../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
wintime.o: ../windows/wintime.c ../putty.h ../puttyps.h ../network.h \
../misc.h ../windows/winstuff.h ../mac/macstuff.h \
../macosx/osx.h ../unix/unix.h ../puttymem.h ../tree234.h \
../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
winucs.o: ../windows/winucs.c ../putty.h ../terminal.h ../misc.h \
../puttyps.h ../network.h ../tree234.h ../puttymem.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
winutils.o: ../windows/winutils.c ../putty.h ../misc.h ../puttyps.h \
../network.h ../puttymem.h ../windows/winstuff.h \
../mac/macstuff.h ../macosx/osx.h ../unix/unix.h \
../tree234.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
x11fwd.o: ../x11fwd.c ../putty.h ../ssh.h ../tree234.h ../puttyps.h \
../network.h ../misc.h ../puttymem.h ../int64.h \
../windows/winstuff.h ../mac/macstuff.h ../macosx/osx.h \
../unix/unix.h ../windows/winhelp.h ../charset/charset.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
xenc.o: ../charset/xenc.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
xkeysym.o: ../unix/xkeysym.c ../misc.h ../puttymem.h
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
xpmptcfg.o: ../unix/xpmptcfg.c
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
xpmpterm.o: ../unix/xpmpterm.c
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
xpmpucfg.o: ../unix/xpmpucfg.c
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
xpmputty.o: ../unix/xpmputty.c
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $<
clean:
rm -f *.o *.dmg plink pscp psftp puttygen
rm -rf *.app

34
puttysrc/MACOSX/OSX.H Normal file
View File

@@ -0,0 +1,34 @@
#ifndef PUTTY_OSX_H
#define PUTTY_OSX_H
/*
* Cocoa defines `FontSpec' itself, so we must change its name.
* (Arrgh.)
*/
#define FontSpec FontSpec_OSX_Proof
/*
* Define the various compatibility symbols to make uxpty.c compile
* correctly on OS X.
*/
#define BSD_PTYS
#define OMIT_UTMP
#define HAVE_NO_SETRESUID
#define NOT_X_WINDOWS
/*
* OS X is largely just Unix, so we can include most of this
* unchanged.
*/
#include "unix.h"
/*
* Functions exported by osxsel.m. (Both of these functions are
* expected to be called in the _main_ thread: the select subthread
* is an implementation detail of osxsel.m and ideally should not
* be visible at all outside it.)
*/
void osxsel_init(void); /* call this to kick things off */
void osxsel_process_results(void); /* call this on receipt of a netevent */
#endif

107
puttysrc/MACOSX/OSXCLASS.H Normal file
View File

@@ -0,0 +1,107 @@
/*
* Header file for the Objective-C parts of Mac OS X PuTTY. This
* file contains the class definitions, which would cause compile
* failures in the pure C modules if they appeared in osx.h.
*/
#ifndef PUTTY_OSXCLASS_H
#define PUTTY_OSXCLASS_H
#include "putty.h"
/*
* The application controller class, defined in osxmain.m.
*/
@interface AppController : NSObject
{
NSTimer *timer;
}
- (void)newSessionConfig:(id)sender;
- (void)newTerminal:(id)sender;
- (void)newSessionWithConfig:(id)cfg;
- (void)setTimer:(long)next;
@end
extern AppController *controller;
/*
* The SessionWindow class, defined in osxwin.m.
*/
struct alert_queue {
struct alert_queue *next;
NSAlert *alert;
void (*callback)(void *, int);
void *ctx;
};
@class SessionWindow;
@class TerminalView;
@interface SessionWindow : NSWindow
{
Terminal *term;
TerminalView *termview;
struct unicode_data ucsdata;
void *logctx;
Config cfg;
void *ldisc;
Backend *back;
void *backhandle;
int exited;
/*
* The following two members relate to the currently active
* alert sheet, if any. They are NULL if there isn't one.
*/
void (*alert_callback)(void *, int);
void *alert_ctx;
/* This queues future alerts that need to be shown. */
struct alert_queue *alert_qhead, *alert_qtail;
}
- (id)initWithConfig:(Config)cfg;
- (void)drawStartFinish:(BOOL)start;
- (void)setColour:(int)n r:(float)r g:(float)g b:(float)b;
- (Config *)cfg;
- (void)doText:(wchar_t *)text len:(int)len x:(int)x y:(int)y
attr:(unsigned long)attr lattr:(int)lattr;
- (int)fromBackend:(const char *)data len:(int)len isStderr:(int)is_stderr;
- (int)fromBackendUntrusted:(const char *)data len:(int)len;
- (void)startAlert:(NSAlert *)alert
withCallback:(void (*)(void *, int))callback andCtx:(void *)ctx;
- (void)endSession:(int)clean;
- (void)notifyRemoteExit;
- (Terminal *)term;
@end
/*
* The ConfigWindow class, defined in osxdlg.m.
*/
@class ConfigWindow;
@interface ConfigWindow : NSWindow
{
NSOutlineView *treeview;
struct controlbox *ctrlbox;
void *dv;
Config cfg;
}
- (id)initWithConfig:(Config)cfg;
@end
/*
* Functions exported by osxctrls.m. (They have to go in this
* header file and not osx.h, because some of them have Cocoa class
* types in their prototypes.)
*/
#define HSPACING 12 /* needed in osxdlg.m and osxctrls.m */
#define VSPACING 8
void *fe_dlg_init(void *data, NSWindow *window, NSObject *target, SEL action);
void fe_dlg_free(void *dv);
void create_ctrls(void *dv, NSView *parent, struct controlset *s,
int *minw, int *minh);
int place_ctrls(void *dv, struct controlset *s, int leftx, int topy,
int width); /* returns height used */
void select_panel(void *dv, struct controlbox *b, const char *name);
#endif /* PUTTY_OSXCLASS_H */

1815
puttysrc/MACOSX/OSXCTRLS.M Normal file

File diff suppressed because it is too large Load Diff

509
puttysrc/MACOSX/OSXDLG.M Normal file
View File

@@ -0,0 +1,509 @@
/*
* osxdlg.m: various PuTTY dialog boxes for OS X.
*/
#import <Cocoa/Cocoa.h>
#include "putty.h"
#include "storage.h"
#include "dialog.h"
#include "osxclass.h"
/*
* The `ConfigWindow' class is used to start up a new PuTTY
* session.
*/
@class ConfigTree;
@interface ConfigTree : NSObject
{
NSString **paths;
int *levels;
int nitems, itemsize;
}
- (void)addPath:(char *)path;
@end
@implementation ConfigTree
- (id)init
{
self = [super init];
paths = NULL;
levels = NULL;
nitems = itemsize = 0;
return self;
}
- (void)addPath:(char *)path
{
if (nitems >= itemsize) {
itemsize += 32;
paths = sresize(paths, itemsize, NSString *);
levels = sresize(levels, itemsize, int);
}
paths[nitems] = [[NSString stringWithCString:path] retain];
levels[nitems] = ctrl_path_elements(path) - 1;
nitems++;
}
- (void)dealloc
{
int i;
for (i = 0; i < nitems; i++)
[paths[i] release];
sfree(paths);
sfree(levels);
[super dealloc];
}
- (id)iterateChildren:(int)index ofItem:(id)item count:(int *)count
{
int i, plevel;
if (item) {
for (i = 0; i < nitems; i++)
if (paths[i] == item)
break;
assert(i < nitems);
plevel = levels[i];
i++;
} else {
i = 0;
plevel = -1;
}
if (count)
*count = 0;
while (index > 0) {
if (i >= nitems || levels[i] != plevel+1)
return nil;
if (count)
(*count)++;
do {
i++;
} while (i < nitems && levels[i] > plevel+1);
index--;
}
return paths[i];
}
- (id)outlineView:(NSOutlineView *)outlineView child:(int)index ofItem:(id)item
{
return [self iterateChildren:index ofItem:item count:NULL];
}
- (int)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item
{
int count = 0;
/* pass nitems+1 to ensure we run off the end */
[self iterateChildren:nitems+1 ofItem:item count:&count];
return count;
}
- (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item
{
return [self outlineView:outlineView numberOfChildrenOfItem:item] > 0;
}
- (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item
{
/*
* Trim off all path elements except the last one.
*/
NSArray *components = [item componentsSeparatedByString:@"/"];
return [components objectAtIndex:[components count]-1];
}
@end
@implementation ConfigWindow
- (id)initWithConfig:(Config)aCfg
{
NSScrollView *scrollview;
NSTableColumn *col;
ConfigTree *treedata;
int by = 0, mby = 0;
int wmin = 0;
int hmin = 0;
int panelht = 0;
ctrlbox = ctrl_new_box();
setup_config_box(ctrlbox, FALSE /*midsession*/, aCfg.protocol,
0 /* protcfginfo */);
unix_setup_config_box(ctrlbox, FALSE /*midsession*/, aCfg.protocol);
cfg = aCfg; /* structure copy */
self = [super initWithContentRect:NSMakeRect(0,0,300,300)
styleMask:(NSTitledWindowMask | NSMiniaturizableWindowMask |
NSClosableWindowMask)
backing:NSBackingStoreBuffered
defer:YES];
[self setTitle:@"PuTTY Configuration"];
[self setIgnoresMouseEvents:NO];
dv = fe_dlg_init(&cfg, self, self, @selector(configBoxFinished:));
scrollview = [[NSScrollView alloc] initWithFrame:NSMakeRect(20,20,10,10)];
treeview = [[NSOutlineView alloc] initWithFrame:[scrollview frame]];
[scrollview setBorderType:NSLineBorder];
[scrollview setDocumentView:treeview];
[[self contentView] addSubview:scrollview];
[scrollview setHasVerticalScroller:YES];
[scrollview setAutohidesScrollers:YES];
/* FIXME: the below is untested. Test it then remove this notice. */
[treeview setAllowsColumnReordering:NO];
[treeview setAllowsColumnResizing:NO];
[treeview setAllowsMultipleSelection:NO];
[treeview setAllowsEmptySelection:NO];
[treeview setAllowsColumnSelection:YES];
treedata = [[[ConfigTree alloc] init] retain];
col = [[NSTableColumn alloc] initWithIdentifier:nil];
[treeview addTableColumn:col];
[treeview setOutlineTableColumn:col];
[[treeview headerView] setFrame:NSMakeRect(0,0,0,0)];
/*
* Create the controls.
*/
{
int i;
char *path = NULL;
for (i = 0; i < ctrlbox->nctrlsets; i++) {
struct controlset *s = ctrlbox->ctrlsets[i];
int mw, mh;
if (!*s->pathname) {
create_ctrls(dv, [self contentView], s, &mw, &mh);
by += 20 + mh;
if (wmin < mw + 40)
wmin = mw + 40;
} else {
int j = path ? ctrl_path_compare(s->pathname, path) : 0;
if (j != INT_MAX) { /* add to treeview, start new panel */
char *c;
/*
* We expect never to find an implicit path
* component. For example, we expect never to
* see A/B/C followed by A/D/E, because that
* would _implicitly_ create A/D. All our path
* prefixes are expected to contain actual
* controls and be selectable in the treeview;
* so we would expect to see A/D _explicitly_
* before encountering A/D/E.
*/
assert(j == ctrl_path_elements(s->pathname) - 1);
c = strrchr(s->pathname, '/');
if (!c)
c = s->pathname;
else
c++;
[treedata addPath:s->pathname];
path = s->pathname;
panelht = 0;
}
create_ctrls(dv, [self contentView], s, &mw, &mh);
if (wmin < mw + 3*20+150)
wmin = mw + 3*20+150;
panelht += mh + 20;
if (hmin < panelht - 20)
hmin = panelht - 20;
}
}
}
{
int i;
NSRect r;
[treeview setDataSource:treedata];
for (i = [treeview numberOfRows]; i-- ;)
[treeview expandItem:[treeview itemAtRow:i] expandChildren:YES];
[treeview sizeToFit];
r = [treeview frame];
if (hmin < r.size.height)
hmin = r.size.height;
}
[self setContentSize:NSMakeSize(wmin, hmin+60+by)];
[scrollview setFrame:NSMakeRect(20, 40+by, 150, hmin)];
[treeview setDelegate:self];
mby = by;
/*
* Now place the controls.
*/
{
int i;
char *path = NULL;
panelht = 0;
for (i = 0; i < ctrlbox->nctrlsets; i++) {
struct controlset *s = ctrlbox->ctrlsets[i];
if (!*s->pathname) {
by -= VSPACING + place_ctrls(dv, s, 20, by, wmin-40);
} else {
if (!path || strcmp(s->pathname, path))
panelht = 0;
panelht += VSPACING + place_ctrls(dv, s, 2*20+150,
40+mby+hmin-panelht,
wmin - (3*20+150));
path = s->pathname;
}
}
}
select_panel(dv, ctrlbox, [[treeview itemAtRow:0] cString]);
[treeview reloadData];
dlg_refresh(NULL, dv);
[self center]; /* :-) */
return self;
}
- (void)configBoxFinished:(id)object
{
int ret = [object intValue]; /* it'll be an NSNumber */
if (ret) {
[controller performSelectorOnMainThread:
@selector(newSessionWithConfig:)
withObject:[NSData dataWithBytes:&cfg length:sizeof(cfg)]
waitUntilDone:NO];
}
[self close];
}
- (void)outlineViewSelectionDidChange:(NSNotification *)notification
{
const char *path = [[treeview itemAtRow:[treeview selectedRow]] cString];
select_panel(dv, ctrlbox, path);
}
- (BOOL)outlineView:(NSOutlineView *)outlineView
shouldEditTableColumn:(NSTableColumn *)tableColumn item:(id)item
{
return NO; /* no editing! */
}
@end
/* ----------------------------------------------------------------------
* Various special-purpose dialog boxes.
*/
struct appendstate {
void (*callback)(void *ctx, int result);
void *ctx;
};
static void askappend_callback(void *ctx, int result)
{
struct appendstate *state = (struct appendstate *)ctx;
state->callback(state->ctx, (result == NSAlertFirstButtonReturn ? 2 :
result == NSAlertSecondButtonReturn ? 1 : 0));
sfree(state);
}
int askappend(void *frontend, Filename filename,
void (*callback)(void *ctx, int result), void *ctx)
{
static const char msgtemplate[] =
"The session log file \"%s\" already exists. "
"You can overwrite it with a new session log, "
"append your session log to the end of it, "
"or disable session logging for this session.";
char *text;
SessionWindow *win = (SessionWindow *)frontend;
struct appendstate *state;
NSAlert *alert;
text = dupprintf(msgtemplate, filename.path);
state = snew(struct appendstate);
state->callback = callback;
state->ctx = ctx;
alert = [[NSAlert alloc] init];
[alert setInformativeText:[NSString stringWithCString:text]];
[alert addButtonWithTitle:@"Overwrite"];
[alert addButtonWithTitle:@"Append"];
[alert addButtonWithTitle:@"Disable"];
[win startAlert:alert withCallback:askappend_callback andCtx:state];
return -1;
}
struct algstate {
void (*callback)(void *ctx, int result);
void *ctx;
};
static void askalg_callback(void *ctx, int result)
{
struct algstate *state = (struct algstate *)ctx;
state->callback(state->ctx, result == NSAlertFirstButtonReturn);
sfree(state);
}
int askalg(void *frontend, const char *algtype, const char *algname,
void (*callback)(void *ctx, int result), void *ctx)
{
static const char msg[] =
"The first %s supported by the server is "
"%s, which is below the configured warning threshold.\n"
"Continue with connection?";
char *text;
SessionWindow *win = (SessionWindow *)frontend;
struct algstate *state;
NSAlert *alert;
text = dupprintf(msg, algtype, algname);
state = snew(struct algstate);
state->callback = callback;
state->ctx = ctx;
alert = [[NSAlert alloc] init];
[alert setInformativeText:[NSString stringWithCString:text]];
[alert addButtonWithTitle:@"Yes"];
[alert addButtonWithTitle:@"No"];
[win startAlert:alert withCallback:askalg_callback andCtx:state];
return -1;
}
struct hostkeystate {
char *host, *keytype, *keystr;
int port;
void (*callback)(void *ctx, int result);
void *ctx;
};
static void verify_ssh_host_key_callback(void *ctx, int result)
{
struct hostkeystate *state = (struct hostkeystate *)ctx;
if (result == NSAlertThirdButtonReturn) /* `Accept' */
store_host_key(state->host, state->port,
state->keytype, state->keystr);
state->callback(state->ctx, result != NSAlertFirstButtonReturn);
sfree(state->host);
sfree(state->keytype);
sfree(state->keystr);
sfree(state);
}
int verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
char *keystr, char *fingerprint,
void (*callback)(void *ctx, int result), void *ctx)
{
static const char absenttxt[] =
"The server's host key is not cached. You have no guarantee "
"that the server is the computer you think it is.\n"
"The server's %s key fingerprint is:\n"
"%s\n"
"If you trust this host, press \"Accept\" to add the key to "
"PuTTY's cache and carry on connecting.\n"
"If you want to carry on connecting just once, without "
"adding the key to the cache, press \"Connect Once\".\n"
"If you do not trust this host, press \"Cancel\" to abandon the "
"connection.";
static const char wrongtxt[] =
"WARNING - POTENTIAL SECURITY BREACH!\n"
"The server's host key does not match the one PuTTY has "
"cached. This means that either the server administrator "
"has changed the host key, or you have actually connected "
"to another computer pretending to be the server.\n"
"The new %s key fingerprint is:\n"
"%s\n"
"If you were expecting this change and trust the new key, "
"press \"Accept\" to update PuTTY's cache and continue connecting.\n"
"If you want to carry on connecting but without updating "
"the cache, press \"Connect Once\".\n"
"If you want to abandon the connection completely, press "
"\"Cancel\" to cancel. Pressing \"Cancel\" is the ONLY guaranteed "
"safe choice.";
int ret;
char *text;
SessionWindow *win = (SessionWindow *)frontend;
struct hostkeystate *state;
NSAlert *alert;
/*
* Verify the key.
*/
ret = verify_host_key(host, port, keytype, keystr);
if (ret == 0)
return 1;
text = dupprintf((ret == 2 ? wrongtxt : absenttxt), keytype, fingerprint);
state = snew(struct hostkeystate);
state->callback = callback;
state->ctx = ctx;
state->host = dupstr(host);
state->port = port;
state->keytype = dupstr(keytype);
state->keystr = dupstr(keystr);
alert = [[NSAlert alloc] init];
[alert setInformativeText:[NSString stringWithCString:text]];
[alert addButtonWithTitle:@"Cancel"];
[alert addButtonWithTitle:@"Connect Once"];
[alert addButtonWithTitle:@"Accept"];
[win startAlert:alert withCallback:verify_ssh_host_key_callback
andCtx:state];
return -1;
}
void old_keyfile_warning(void)
{
/*
* This should never happen on OS X. We hope.
*/
}
static void connection_fatal_callback(void *ctx, int result)
{
SessionWindow *win = (SessionWindow *)ctx;
[win endSession:FALSE];
}
void connection_fatal(void *frontend, char *p, ...)
{
SessionWindow *win = (SessionWindow *)frontend;
va_list ap;
char *msg;
NSAlert *alert;
va_start(ap, p);
msg = dupvprintf(p, ap);
va_end(ap);
alert = [[NSAlert alloc] init];
[alert setInformativeText:[NSString stringWithCString:msg]];
[alert addButtonWithTitle:@"Proceed"];
[win startAlert:alert withCallback:connection_fatal_callback
andCtx:win];
}

410
puttysrc/MACOSX/OSXMAIN.M Normal file
View File

@@ -0,0 +1,410 @@
/*
* osxmain.m: main-program file of Mac OS X PuTTY.
*/
#import <Cocoa/Cocoa.h>
#define PUTTY_DO_GLOBALS /* actually _define_ globals */
#include "putty.h"
#include "osxclass.h"
/* ----------------------------------------------------------------------
* Global variables.
*/
AppController *controller;
/* ----------------------------------------------------------------------
* Miscellaneous elements of the interface to the cross-platform
* and Unix PuTTY code.
*/
const char platform_x11_best_transport[] = "unix";
char *platform_get_x_display(void) {
return NULL;
}
FontSpec platform_default_fontspec(const char *name)
{
FontSpec ret;
/* FIXME */
return ret;
}
Filename platform_default_filename(const char *name)
{
Filename ret;
if (!strcmp(name, "LogFileName"))
strcpy(ret.path, "putty.log");
else
*ret.path = '\0';
return ret;
}
char *platform_default_s(const char *name)
{
return NULL;
}
int platform_default_i(const char *name, int def)
{
if (!strcmp(name, "CloseOnExit"))
return 2; /* maps to FORCE_ON after painful rearrangement :-( */
return def;
}
char *x_get_default(const char *key)
{
return NULL; /* this is a stub */
}
static void commonfatalbox(char *p, va_list ap)
{
char errorbuf[2048];
NSAlert *alert;
/*
* We may have come here because we ran out of memory, in which
* case it's entirely likely that that further memory
* allocations will fail. So (a) we use vsnprintf to format the
* error message rather than the usual dupvprintf; and (b) we
* have a fallback way to get the message out via stderr if
* even creating an NSAlert fails.
*/
vsnprintf(errorbuf, lenof(errorbuf), p, ap);
alert = [NSAlert alloc];
if (!alert) {
fprintf(stderr, "fatal error (and NSAlert failed): %s\n", errorbuf);
} else {
alert = [[alert init] autorelease];
[alert addButtonWithTitle:@"Terminate"];
[alert setInformativeText:[NSString stringWithCString:errorbuf]];
[alert runModal];
}
exit(1);
}
void fatalbox(char *p, ...)
{
va_list ap;
va_start(ap, p);
commonfatalbox(p, ap);
va_end(ap);
}
void modalfatalbox(char *p, ...)
{
va_list ap;
va_start(ap, p);
commonfatalbox(p, ap);
va_end(ap);
}
void cmdline_error(char *p, ...)
{
va_list ap;
fprintf(stderr, "%s: ", appname);
va_start(ap, p);
vfprintf(stderr, p, ap);
va_end(ap);
fputc('\n', stderr);
exit(1);
}
/*
* Clean up and exit.
*/
void cleanup_exit(int code)
{
/*
* Clean up.
*/
sk_cleanup();
random_save_seed();
exit(code);
}
/* ----------------------------------------------------------------------
* Tiny extension to NSMenuItem which carries a payload of a `void
* *', allowing several menu items to invoke the same message but
* pass different data through it.
*/
@interface DataMenuItem : NSMenuItem
{
void *payload;
}
- (void)setPayload:(void *)d;
- (void *)getPayload;
@end
@implementation DataMenuItem
- (void)setPayload:(void *)d
{
payload = d;
}
- (void *)getPayload
{
return payload;
}
@end
/* ----------------------------------------------------------------------
* Utility routines for constructing OS X menus.
*/
NSMenu *newmenu(const char *title)
{
return [[[NSMenu allocWithZone:[NSMenu menuZone]]
initWithTitle:[NSString stringWithCString:title]]
autorelease];
}
NSMenu *newsubmenu(NSMenu *parent, const char *title)
{
NSMenuItem *item;
NSMenu *child;
item = [[[NSMenuItem allocWithZone:[NSMenu menuZone]]
initWithTitle:[NSString stringWithCString:title]
action:NULL
keyEquivalent:@""]
autorelease];
child = newmenu(title);
[item setEnabled:YES];
[item setSubmenu:child];
[parent addItem:item];
return child;
}
id initnewitem(NSMenuItem *item, NSMenu *parent, const char *title,
const char *key, id target, SEL action)
{
unsigned mask = NSCommandKeyMask;
if (key[strcspn(key, "-")]) {
while (*key && *key != '-') {
int c = tolower((unsigned char)*key);
if (c == 's') {
mask |= NSShiftKeyMask;
} else if (c == 'o' || c == 'a') {
mask |= NSAlternateKeyMask;
}
key++;
}
if (*key)
key++;
}
item = [[item initWithTitle:[NSString stringWithCString:title]
action:NULL
keyEquivalent:[NSString stringWithCString:key]]
autorelease];
if (*key)
[item setKeyEquivalentModifierMask: mask];
[item setEnabled:YES];
[item setTarget:target];
[item setAction:action];
[parent addItem:item];
return item;
}
NSMenuItem *newitem(NSMenu *parent, char *title, char *key,
id target, SEL action)
{
return initnewitem([NSMenuItem allocWithZone:[NSMenu menuZone]],
parent, title, key, target, action);
}
/* ----------------------------------------------------------------------
* AppController: the object which receives the messages from all
* menu selections that aren't standard OS X functions.
*/
@implementation AppController
- (id)init
{
self = [super init];
timer = NULL;
return self;
}
- (void)newTerminal:(id)sender
{
id win;
Config cfg;
do_defaults(NULL, &cfg);
cfg.protocol = -1; /* PROT_TERMINAL */
win = [[SessionWindow alloc] initWithConfig:cfg];
[win makeKeyAndOrderFront:self];
}
- (void)newSessionConfig:(id)sender
{
id win;
Config cfg;
do_defaults(NULL, &cfg);
win = [[ConfigWindow alloc] initWithConfig:cfg];
[win makeKeyAndOrderFront:self];
}
- (void)newSessionWithConfig:(id)vdata
{
id win;
Config cfg;
NSData *data = (NSData *)vdata;
assert([data length] == sizeof(cfg));
[data getBytes:&cfg];
win = [[SessionWindow alloc] initWithConfig:cfg];
[win makeKeyAndOrderFront:self];
}
- (NSMenu *)applicationDockMenu:(NSApplication *)sender
{
NSMenu *menu = newmenu("Dock Menu");
/*
* FIXME: Add some useful things to this, probably including
* the saved session list.
*/
return menu;
}
- (void)timerFired:(id)sender
{
long now, next;
assert(sender == timer);
/* `sender' is the timer itself, so its userInfo is an NSNumber. */
now = [(NSNumber *)[sender userInfo] longValue];
[sender invalidate];
timer = NULL;
if (run_timers(now, &next))
[self setTimer:next];
}
- (void)setTimer:(long)next
{
long interval = next - GETTICKCOUNT();
float finterval;
if (interval <= 0)
interval = 1; /* just in case */
finterval = interval / (float)TICKSPERSEC;
if (timer) {
[timer invalidate];
}
timer = [NSTimer scheduledTimerWithTimeInterval:finterval
target:self selector:@selector(timerFired:)
userInfo:[NSNumber numberWithLong:next] repeats:NO];
}
@end
void timer_change_notify(long next)
{
[controller setTimer:next];
}
/* ----------------------------------------------------------------------
* Annoyingly, it looks as if I have to actually subclass
* NSApplication if I want to catch NSApplicationDefined events. So
* here goes.
*/
@interface MyApplication : NSApplication
{
}
@end
@implementation MyApplication
- (void)sendEvent:(NSEvent *)ev
{
if ([ev type] == NSApplicationDefined)
osxsel_process_results();
[super sendEvent:ev];
}
@end
/* ----------------------------------------------------------------------
* Main program. Constructs the menus and runs the application.
*/
int main(int argc, char **argv)
{
NSAutoreleasePool *pool;
NSMenu *menu;
NSMenuItem *item;
NSImage *icon;
pool = [[NSAutoreleasePool alloc] init];
icon = [NSImage imageNamed:@"NSApplicationIcon"];
[MyApplication sharedApplication];
[NSApp setApplicationIconImage:icon];
controller = [[[AppController alloc] init] autorelease];
[NSApp setDelegate:controller];
[NSApp setMainMenu: newmenu("Main Menu")];
menu = newsubmenu([NSApp mainMenu], "Apple Menu");
[NSApp setServicesMenu:newsubmenu(menu, "Services")];
[menu addItem:[NSMenuItem separatorItem]];
item = newitem(menu, "Hide PuTTY", "h", NSApp, @selector(hide:));
item = newitem(menu, "Hide Others", "o-h", NSApp, @selector(hideOtherApplications:));
item = newitem(menu, "Show All", "", NSApp, @selector(unhideAllApplications:));
[menu addItem:[NSMenuItem separatorItem]];
item = newitem(menu, "Quit", "q", NSApp, @selector(terminate:));
[NSApp setAppleMenu: menu];
menu = newsubmenu([NSApp mainMenu], "File");
item = newitem(menu, "New", "n", NULL, @selector(newSessionConfig:));
item = newitem(menu, "New Terminal", "t", NULL, @selector(newTerminal:));
item = newitem(menu, "Close", "w", NULL, @selector(performClose:));
menu = newsubmenu([NSApp mainMenu], "Window");
[NSApp setWindowsMenu: menu];
item = newitem(menu, "Minimise Window", "m", NULL, @selector(performMiniaturize:));
// menu = newsubmenu([NSApp mainMenu], "Help");
// item = newitem(menu, "PuTTY Help", "?", NSApp, @selector(showHelp:));
/*
* Start up the sub-thread doing select().
*/
osxsel_init();
/*
* Start up networking.
*/
sk_init();
/*
* FIXME: To make initial debugging more convenient I'm going
* to start by opening a session window unconditionally. This
* will probably change later on.
*/
[controller newSessionConfig:nil];
[NSApp run];
[pool release];
return 0;
}

308
puttysrc/MACOSX/OSXSEL.M Normal file
View File

@@ -0,0 +1,308 @@
/*
* osxsel.m: OS X implementation of the front end interface to uxsel.
*/
#import <Cocoa/Cocoa.h>
#include <unistd.h>
#include "putty.h"
#include "osxclass.h"
/*
* The unofficial Cocoa FAQ at
*
* http://www.alastairs-place.net/cocoa/faq.txt
*
* says that Cocoa has the native ability to be given an fd and
* tell you when it becomes readable, but cannot tell you when it
* becomes _writable_. This is unacceptable to PuTTY, which depends
* for correct functioning on being told both. Therefore, I can't
* use the Cocoa native mechanism.
*
* Instead, I'm going to resort to threads. I start a second thread
* whose job is to do selects. At the termination of every select,
* it posts a Cocoa event into the main thread's event queue, so
* that the main thread gets select results interleaved with other
* GUI operations. Communication from the main thread _to_ the
* select thread is performed by writing to a pipe whose other end
* is one of the file descriptors being selected on. (This is the
* only sensible way, because we have to be able to interrupt a
* select in order to provide a new fd list.)
*/
/*
* In more detail, the select thread must:
*
* - start off by listening to _just_ the pipe, waiting to be told
* to begin a select.
*
* - when it receives the `start' command, it should read the
* shared uxsel data (which is protected by a mutex), set up its
* select, and begin it.
*
* - when the select terminates, it should write the results
* (perhaps minus the inter-thread pipe if it's there) into
* shared memory and dispatch a GUI event to let the main thread
* know.
*
* - the main thread will then think about it, do some processing,
* and _then_ send a command saying `now restart select'. Before
* sending that command it might easily have tinkered with the
* uxsel structures, which is why it waited before sending it.
*
* - EOF on the inter-thread pipe, of course, means the process
* has finished completely, so the select thread terminates.
*
* - The main thread may wish to adjust the uxsel settings in the
* middle of a select. In this situation it first writes the new
* data to the shared memory area, then notifies the select
* thread by writing to the inter-thread pipe.
*
* So the upshot is that the sequence of operations performed in
* the select thread must be:
*
* - read a byte from the pipe (which may block)
*
* - read the shared uxsel data and perform a select
*
* - notify the main thread of interesting select results (if any)
*
* - loop round again from the top.
*
* This is sufficient. Notifying the select thread asynchronously
* by writing to the pipe will cause its select to terminate and
* another to begin immediately without blocking. If the select
* thread's select terminates due to network data, its subsequent
* pipe read will block until the main thread is ready to let it
* loose again.
*/
static int osxsel_pipe[2];
static NSLock *osxsel_inlock;
static fd_set osxsel_rfds_in;
static fd_set osxsel_wfds_in;
static fd_set osxsel_xfds_in;
static int osxsel_inmax;
static NSLock *osxsel_outlock;
static fd_set osxsel_rfds_out;
static fd_set osxsel_wfds_out;
static fd_set osxsel_xfds_out;
static int osxsel_outmax;
static int inhibit_start_select;
/*
* NSThread requires an object method as its thread procedure, so
* here I define a trivial holding class.
*/
@class OSXSel;
@interface OSXSel : NSObject
{
}
- (void)runThread:(id)arg;
@end
@implementation OSXSel
- (void)runThread:(id)arg
{
char c;
fd_set r, w, x;
int n, ret;
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
while (1) {
/*
* Read one byte from the pipe.
*/
ret = read(osxsel_pipe[0], &c, 1);
if (ret <= 0)
return; /* terminate the thread */
/*
* Now set up the select data.
*/
[osxsel_inlock lock];
memcpy(&r, &osxsel_rfds_in, sizeof(fd_set));
memcpy(&w, &osxsel_wfds_in, sizeof(fd_set));
memcpy(&x, &osxsel_xfds_in, sizeof(fd_set));
n = osxsel_inmax;
[osxsel_inlock unlock];
FD_SET(osxsel_pipe[0], &r);
if (n < osxsel_pipe[0]+1)
n = osxsel_pipe[0]+1;
/*
* Perform the select.
*/
ret = select(n, &r, &w, &x, NULL);
/*
* Detect the one special case in which the only
* interesting fd was the inter-thread pipe. In that
* situation only we are interested - the main thread will
* not be!
*/
if (ret == 1 && FD_ISSET(osxsel_pipe[0], &r))
continue; /* just loop round again */
/*
* Write the select results to shared data.
*
* I _think_ we don't need this data to be lock-protected:
* it won't be read by the main thread until after we send
* a message indicating that we've finished writing it, and
* we won't start another select (hence potentially writing
* it again) until the main thread notifies us in return.
*
* However, I'm scared of multithreading and not totally
* convinced of my reasoning, so I'm going to lock it
* anyway.
*/
[osxsel_outlock lock];
memcpy(&osxsel_rfds_out, &r, sizeof(fd_set));
memcpy(&osxsel_wfds_out, &w, sizeof(fd_set));
memcpy(&osxsel_xfds_out, &x, sizeof(fd_set));
osxsel_outmax = n;
[osxsel_outlock unlock];
/*
* Post a message to the main thread's message queue
* telling it that select data is available.
*/
[NSApp postEvent:[NSEvent otherEventWithType:NSApplicationDefined
location:NSMakePoint(0,0)
modifierFlags:0
timestamp:0
windowNumber:0
context:nil
subtype:0
data1:0
data2:0]
atStart:NO];
}
[pool release];
}
@end
void osxsel_init(void)
{
uxsel_init();
if (pipe(osxsel_pipe) < 0) {
fatalbox("Unable to set up inter-thread pipe for select");
}
[NSThread detachNewThreadSelector:@selector(runThread:)
toTarget:[[[OSXSel alloc] init] retain] withObject:nil];
/*
* Also initialise (i.e. clear) the input fd_sets. Need not
* start a select just yet - the select thread will block until
* we have at least one fd for it!
*/
FD_ZERO(&osxsel_rfds_in);
FD_ZERO(&osxsel_wfds_in);
FD_ZERO(&osxsel_xfds_in);
osxsel_inmax = 0;
/*
* Initialise the mutex locks used to protect the data passed
* between threads.
*/
osxsel_inlock = [[[NSLock alloc] init] retain];
osxsel_outlock = [[[NSLock alloc] init] retain];
}
static void osxsel_start_select(void)
{
char c = 'g'; /* for `Go!' :-) but it's never used */
if (!inhibit_start_select)
write(osxsel_pipe[1], &c, 1);
}
int uxsel_input_add(int fd, int rwx)
{
/*
* Add the new fd to the appropriate input fd_sets, then write
* to the inter-thread pipe.
*/
[osxsel_inlock lock];
if (rwx & 1)
FD_SET(fd, &osxsel_rfds_in);
else
FD_CLR(fd, &osxsel_rfds_in);
if (rwx & 2)
FD_SET(fd, &osxsel_wfds_in);
else
FD_CLR(fd, &osxsel_wfds_in);
if (rwx & 4)
FD_SET(fd, &osxsel_xfds_in);
else
FD_CLR(fd, &osxsel_xfds_in);
if (osxsel_inmax < fd+1)
osxsel_inmax = fd+1;
[osxsel_inlock unlock];
osxsel_start_select();
/*
* We must return an `id' which will be passed back to us at
* the time of uxsel_input_remove. Since we have no need to
* store ids in that sense, we might as well go with the fd
* itself.
*/
return fd;
}
void uxsel_input_remove(int id)
{
/*
* Remove the fd from all the input fd_sets. In this
* implementation, the simplest way to do that is to call
* uxsel_input_add with rwx==0!
*/
uxsel_input_add(id, 0);
}
/*
* Function called in the main thread to process results. It will
* have to read the output fd_sets, go through them, call back to
* uxsel with the results, and then write to the inter-thread pipe.
*
* This function will have to be called from an event handler in
* osxmain.m, which will therefore necessarily contain a small part
* of this mechanism (along with calling osxsel_init).
*/
void osxsel_process_results(void)
{
int i;
/*
* We must write to the pipe to start a fresh select _even if_
* there were no changes. So for efficiency, we set a flag here
* which inhibits uxsel_input_{add,remove} from writing to the
* pipe; then once we finish processing, we clear the flag
* again and write a single byte ourselves. It's cleaner,
* because it wakes up the select thread fewer times.
*/
inhibit_start_select = TRUE;
[osxsel_outlock lock];
for (i = 0; i < osxsel_outmax; i++) {
if (FD_ISSET(i, &osxsel_xfds_out))
select_result(i, 4);
}
for (i = 0; i < osxsel_outmax; i++) {
if (FD_ISSET(i, &osxsel_rfds_out))
select_result(i, 1);
}
for (i = 0; i < osxsel_outmax; i++) {
if (FD_ISSET(i, &osxsel_wfds_out))
select_result(i, 2);
}
[osxsel_outlock unlock];
inhibit_start_select = FALSE;
osxsel_start_select();
}

1248
puttysrc/MACOSX/OSXWIN.M Normal file

File diff suppressed because it is too large Load Diff

BIN
puttysrc/MACOSX/PUTTY.ICN Normal file

Binary file not shown.

View File

@@ -0,0 +1,83 @@
This directory contains a Mac OS X port of PuTTY/pterm, running as a
native Aqua GUI application.
THIS PORT IS CURRENTLY UNFINISHED AND EXPERIMENTAL. It is _not_
considered to be of release quality, even if you've found it (and
are reading this) in a PuTTY release source archive. You are welcome
to try using it, but don't be surprised at unexpected behaviour. I'm
not kidding.
In particular, I have not yet decided where OS X PuTTY should store
its configuration data. Options include storing it in ~/.putty to be
compatible with Unix PuTTY, storing it wherever is compatible with
Mac Classic PuTTY, storing it in a natively OS X location, or
sorting out the `config-locations' wishlist item and doing all
three. Therefore, if you start using this port and create a whole
load of saved sessions, you should not be surprised if a future
version of the port decides to look somewhere completely different
for the data and therefore loses them all. If that happens, don't
say you weren't warned!
Other ways in which the port is currently unfinished include:
Missing terminal window features
--------------------------------
- terminal display is horribly slow
- fonts aren't configurable
- several features are unimplemented in the terminal display:
underlining, non-solid-block cursors, double-width and
double-height line attributes, bold as font rather than as
colour, wide (CJK) characters, combining characters.
- there's no scrollbar
- terminal window resizing isn't implemented yet
- proper window placement (cascading down and right from the
starting position, plus remembering previous window positions per
the Apple HIG) is not implemented
Missing alert box features
--------------------------
- warn-on-close isn't implemented
Missing input features
----------------------
- use of Alt+numberpad to enter arbitrary numeric character codes
is not yet supported
- there's no Meta key yet. (I'd like to at least have the
possibility of using Command rather than Option as the Meta key,
since the latter is necessary to send some characters, including
the rather important # on Apple UK keyboards; but trapping
Command-<key> and sending it to the window rather than the
application menu requires me to make a positive effort of some
sort and I haven't got round to it yet. For those Mac users who
consider their Command key sacrosanct, don't worry, this option
_will_ be configurable and _will_ be off by default.)
- there's no specials menu
- mouse activity isn't supported (neither cut-and-paste nor xterm
mouse tracking)
Missing terminal emulation features
-----------------------------------
- currently no support for server-side window management requests
(i.e. escape sequences to minimise or maximise the window,
request or change its position and size, change its title etc)
- window title is currently fixed
Other missing features
----------------------
- no Event Log
- no mid-session Change Settings