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

51
puttysrc/UNIX/CONFIGUR.AC Normal file
View File

@@ -0,0 +1,51 @@
# To compile this into a configure script, you need:
# * Autoconf 2.50 or newer
# * Gtk (for $prefix/share/aclocal/gtk.m4)
# * Automake (for aclocal)
# If you've got them, running "autoreconf" should work.
AC_INIT
AC_CONFIG_FILES([Makefile])
AC_CONFIG_HEADERS([uxconfig.h:uxconfig.in])
AC_PROG_INSTALL
AC_PROG_CC
if test "X$GCC" = Xyes; then
CFLAGS="$CFLAGS -Wall -Werror"
fi
AC_CHECK_HEADERS([utmpx.h sys/select.h],,,[
#include <sys/types.h>
#include <utmp.h>])
AM_PATH_GTK([1.2.0], [all_targets="all-cli all-gtk"], [all_targets="all-cli"])
AC_SUBST([all_targets])
AC_SEARCH_LIBS([socket], [xnet])
AC_CHECK_FUNCS([getaddrinfo ptsname setresuid strsignal updwtmpx])
AC_OUTPUT
AH_BOTTOM([
/* Convert autoconf definitions to ones that PuTTY wants. */
#ifndef HAVE_GETADDRINFO
# define NO_IPV6
#endif
#ifndef HAVE_SETRESUID
# define HAVE_NO_SETRESUID
#endif
#ifndef HAVE_STRSIGNAL
# define HAVE_NO_STRSIGNAL
#endif
#if !defined(HAVE_UTMPX_H) || !defined(HAVE_UPDWTMPX)
# define OMIT_UTMP
#endif
#ifndef HAVE_PTSNAME
# define BSD_PTYS
#endif
#ifndef HAVE_SYS_SELECT_H
# define HAVE_NO_SYS_SELECT_H
#endif
])

130
puttysrc/UNIX/GTKCFG.C Normal file
View File

@@ -0,0 +1,130 @@
/*
* gtkcfg.c - the GTK-specific parts of the PuTTY configuration
* box.
*/
#include <assert.h>
#include <stdlib.h>
#include "putty.h"
#include "dialog.h"
#include "storage.h"
static void about_handler(union control *ctrl, void *dlg,
void *data, int event)
{
if (event == EVENT_ACTION) {
about_box(ctrl->generic.context.p);
}
}
void gtk_setup_config_box(struct controlbox *b, int midsession, void *win)
{
struct controlset *s, *s2;
union control *c;
int i;
if (!midsession) {
/*
* Add the About button to the standard panel.
*/
s = ctrl_getset(b, "", "", "");
c = ctrl_pushbutton(s, "About", 'a', HELPCTX(no_help),
about_handler, P(win));
c->generic.column = 0;
}
/*
* GTK makes it rather easier to put the scrollbar on the left
* than Windows does!
*/
s = ctrl_getset(b, "Window", "scrollback",
"Control the scrollback in the window");
ctrl_checkbox(s, "Scrollbar on left", 'l',
HELPCTX(no_help),
dlg_stdcheckbox_handler,
I(offsetof(Config,scrollbar_on_left)));
/*
* Really this wants to go just after `Display scrollbar'. See
* if we can find that control, and do some shuffling.
*/
for (i = 0; i < s->ncontrols; i++) {
c = s->ctrls[i];
if (c->generic.type == CTRL_CHECKBOX &&
c->generic.context.i == offsetof(Config,scrollbar)) {
/*
* Control i is the scrollbar checkbox.
* Control s->ncontrols-1 is the scrollbar-on-left one.
*/
if (i < s->ncontrols-2) {
c = s->ctrls[s->ncontrols-1];
memmove(s->ctrls+i+2, s->ctrls+i+1,
(s->ncontrols-i-2)*sizeof(union control *));
s->ctrls[i+1] = c;
}
break;
}
}
/*
* X requires three more fonts: bold, wide, and wide-bold; also
* we need the fiddly shadow-bold-offset control. This would
* make the Window/Appearance panel rather unwieldy and large,
* so I think the sensible thing here is to _move_ this
* controlset into a separate Window/Fonts panel!
*/
s2 = ctrl_getset(b, "Window/Appearance", "font",
"Font settings");
/* Remove this controlset from b. */
for (i = 0; i < b->nctrlsets; i++) {
if (b->ctrlsets[i] == s2) {
memmove(b->ctrlsets+i, b->ctrlsets+i+1,
(b->nctrlsets-i-1) * sizeof(*b->ctrlsets));
b->nctrlsets--;
break;
}
}
ctrl_settitle(b, "Window/Fonts", "Options controlling font usage");
s = ctrl_getset(b, "Window/Fonts", "font",
"Fonts for displaying non-bold text");
ctrl_fontsel(s, "Font used for ordinary text", 'f',
HELPCTX(no_help),
dlg_stdfontsel_handler, I(offsetof(Config,font)));
ctrl_fontsel(s, "Font used for wide (CJK) text", 'w',
HELPCTX(no_help),
dlg_stdfontsel_handler, I(offsetof(Config,widefont)));
s = ctrl_getset(b, "Window/Fonts", "fontbold",
"Fonts for displaying bolded text");
ctrl_fontsel(s, "Font used for bolded text", 'b',
HELPCTX(no_help),
dlg_stdfontsel_handler, I(offsetof(Config,boldfont)));
ctrl_fontsel(s, "Font used for bold wide text", 'i',
HELPCTX(no_help),
dlg_stdfontsel_handler, I(offsetof(Config,wideboldfont)));
ctrl_checkbox(s, "Use shadow bold instead of bold fonts", 'u',
HELPCTX(no_help),
dlg_stdcheckbox_handler,
I(offsetof(Config,shadowbold)));
ctrl_text(s, "(Note that bold fonts or shadow bolding are only"
" used if you have not requested bolding to be done by"
" changing the text colour.)",
HELPCTX(no_help));
ctrl_editbox(s, "Horizontal offset for shadow bold:", 'z', 20,
HELPCTX(no_help), dlg_stdeditbox_handler,
I(offsetof(Config,shadowboldoffset)), I(-1));
/*
* Markus Kuhn feels, not totally unreasonably, that it's good
* for all applications to shift into UTF-8 mode if they notice
* that they've been started with a LANG setting dictating it,
* so that people don't have to keep remembering a separate
* UTF-8 option for every application they use. Therefore,
* here's an override option in the Translation panel.
*/
s = ctrl_getset(b, "Window/Translation", "trans",
"Character set translation on received data");
ctrl_checkbox(s, "Override with UTF-8 if locale says so", 'l',
HELPCTX(translation_utf8_override),
dlg_stdcheckbox_handler,
I(offsetof(Config,utf8_override)));
}

695
puttysrc/UNIX/GTKCOLS.C Normal file
View File

@@ -0,0 +1,695 @@
/*
* gtkcols.c - implementation of the `Columns' GTK layout container.
*/
#include "gtkcols.h"
static void columns_init(Columns *cols);
static void columns_class_init(ColumnsClass *klass);
static void columns_map(GtkWidget *widget);
static void columns_unmap(GtkWidget *widget);
static void columns_draw(GtkWidget *widget, GdkRectangle *area);
static gint columns_expose(GtkWidget *widget, GdkEventExpose *event);
static void columns_base_add(GtkContainer *container, GtkWidget *widget);
static void columns_remove(GtkContainer *container, GtkWidget *widget);
static void columns_forall(GtkContainer *container, gboolean include_internals,
GtkCallback callback, gpointer callback_data);
static gint columns_focus(GtkContainer *container, GtkDirectionType dir);
static GtkType columns_child_type(GtkContainer *container);
static void columns_size_request(GtkWidget *widget, GtkRequisition *req);
static void columns_size_allocate(GtkWidget *widget, GtkAllocation *alloc);
static GtkContainerClass *parent_class = NULL;
GtkType columns_get_type(void)
{
static GtkType columns_type = 0;
if (!columns_type) {
static const GtkTypeInfo columns_info = {
"Columns",
sizeof(Columns),
sizeof(ColumnsClass),
(GtkClassInitFunc) columns_class_init,
(GtkObjectInitFunc) columns_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
};
columns_type = gtk_type_unique(GTK_TYPE_CONTAINER, &columns_info);
}
return columns_type;
}
static gint (*columns_inherited_focus)(GtkContainer *container,
GtkDirectionType direction);
static void columns_class_init(ColumnsClass *klass)
{
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkContainerClass *container_class;
object_class = (GtkObjectClass *)klass;
widget_class = (GtkWidgetClass *)klass;
container_class = (GtkContainerClass *)klass;
parent_class = gtk_type_class(GTK_TYPE_CONTAINER);
/*
* FIXME: do we have to do all this faffing with set_arg,
* get_arg and child_arg_type? Ick.
*/
widget_class->map = columns_map;
widget_class->unmap = columns_unmap;
widget_class->draw = columns_draw;
widget_class->expose_event = columns_expose;
widget_class->size_request = columns_size_request;
widget_class->size_allocate = columns_size_allocate;
container_class->add = columns_base_add;
container_class->remove = columns_remove;
container_class->forall = columns_forall;
container_class->child_type = columns_child_type;
/* Save the previous value of this method. */
if (!columns_inherited_focus)
columns_inherited_focus = container_class->focus;
container_class->focus = columns_focus;
}
static void columns_init(Columns *cols)
{
GTK_WIDGET_SET_FLAGS(cols, GTK_NO_WINDOW);
cols->children = NULL;
cols->spacing = 0;
}
/*
* These appear to be thoroughly tedious functions; the only reason
* we have to reimplement them at all is because we defined our own
* format for our GList of children...
*/
static void columns_map(GtkWidget *widget)
{
Columns *cols;
ColumnsChild *child;
GList *children;
g_return_if_fail(widget != NULL);
g_return_if_fail(IS_COLUMNS(widget));
cols = COLUMNS(widget);
GTK_WIDGET_SET_FLAGS(cols, GTK_MAPPED);
for (children = cols->children;
children && (child = children->data);
children = children->next) {
if (child->widget &&
GTK_WIDGET_VISIBLE(child->widget) &&
!GTK_WIDGET_MAPPED(child->widget))
gtk_widget_map(child->widget);
}
}
static void columns_unmap(GtkWidget *widget)
{
Columns *cols;
ColumnsChild *child;
GList *children;
g_return_if_fail(widget != NULL);
g_return_if_fail(IS_COLUMNS(widget));
cols = COLUMNS(widget);
GTK_WIDGET_UNSET_FLAGS(cols, GTK_MAPPED);
for (children = cols->children;
children && (child = children->data);
children = children->next) {
if (child->widget &&
GTK_WIDGET_VISIBLE(child->widget) &&
GTK_WIDGET_MAPPED(child->widget))
gtk_widget_unmap(child->widget);
}
}
static void columns_draw(GtkWidget *widget, GdkRectangle *area)
{
Columns *cols;
ColumnsChild *child;
GList *children;
GdkRectangle child_area;
g_return_if_fail(widget != NULL);
g_return_if_fail(IS_COLUMNS(widget));
if (GTK_WIDGET_DRAWABLE(widget)) {
cols = COLUMNS(widget);
for (children = cols->children;
children && (child = children->data);
children = children->next) {
if (child->widget &&
GTK_WIDGET_DRAWABLE(child->widget) &&
gtk_widget_intersect(child->widget, area, &child_area))
gtk_widget_draw(child->widget, &child_area);
}
}
}
static gint columns_expose(GtkWidget *widget, GdkEventExpose *event)
{
Columns *cols;
ColumnsChild *child;
GList *children;
GdkEventExpose child_event;
g_return_val_if_fail(widget != NULL, FALSE);
g_return_val_if_fail(IS_COLUMNS(widget), FALSE);
g_return_val_if_fail(event != NULL, FALSE);
if (GTK_WIDGET_DRAWABLE(widget)) {
cols = COLUMNS(widget);
child_event = *event;
for (children = cols->children;
children && (child = children->data);
children = children->next) {
if (child->widget &&
GTK_WIDGET_DRAWABLE(child->widget) &&
GTK_WIDGET_NO_WINDOW(child->widget) &&
gtk_widget_intersect(child->widget, &event->area,
&child_event.area))
gtk_widget_event(child->widget, (GdkEvent *)&child_event);
}
}
return FALSE;
}
static void columns_base_add(GtkContainer *container, GtkWidget *widget)
{
Columns *cols;
g_return_if_fail(container != NULL);
g_return_if_fail(IS_COLUMNS(container));
g_return_if_fail(widget != NULL);
cols = COLUMNS(container);
/*
* Default is to add a new widget spanning all columns.
*/
columns_add(cols, widget, 0, 0); /* 0 means ncols */
}
static void columns_remove(GtkContainer *container, GtkWidget *widget)
{
Columns *cols;
ColumnsChild *child;
GtkWidget *childw;
GList *children;
gboolean was_visible;
g_return_if_fail(container != NULL);
g_return_if_fail(IS_COLUMNS(container));
g_return_if_fail(widget != NULL);
cols = COLUMNS(container);
for (children = cols->children;
children && (child = children->data);
children = children->next) {
if (child->widget != widget)
continue;
was_visible = GTK_WIDGET_VISIBLE(widget);
gtk_widget_unparent(widget);
cols->children = g_list_remove_link(cols->children, children);
g_list_free(children);
g_free(child);
if (was_visible)
gtk_widget_queue_resize(GTK_WIDGET(container));
break;
}
for (children = cols->taborder;
children && (childw = children->data);
children = children->next) {
if (childw != widget)
continue;
cols->taborder = g_list_remove_link(cols->taborder, children);
g_list_free(children);
break;
}
}
static void columns_forall(GtkContainer *container, gboolean include_internals,
GtkCallback callback, gpointer callback_data)
{
Columns *cols;
ColumnsChild *child;
GList *children, *next;
g_return_if_fail(container != NULL);
g_return_if_fail(IS_COLUMNS(container));
g_return_if_fail(callback != NULL);
cols = COLUMNS(container);
for (children = cols->children;
children && (child = children->data);
children = next) {
/*
* We can't wait until after the callback to assign
* `children = children->next', because the callback might
* be gtk_widget_destroy, which would remove the link
* `children' from the list! So instead we must get our
* hands on the value of the `next' pointer _before_ the
* callback.
*/
next = children->next;
if (child->widget)
callback(child->widget, callback_data);
}
}
static GtkType columns_child_type(GtkContainer *container)
{
return GTK_TYPE_WIDGET;
}
GtkWidget *columns_new(gint spacing)
{
Columns *cols;
cols = gtk_type_new(columns_get_type());
cols->spacing = spacing;
return GTK_WIDGET(cols);
}
void columns_set_cols(Columns *cols, gint ncols, const gint *percentages)
{
ColumnsChild *childdata;
gint i;
g_return_if_fail(cols != NULL);
g_return_if_fail(IS_COLUMNS(cols));
g_return_if_fail(ncols > 0);
g_return_if_fail(percentages != NULL);
childdata = g_new(ColumnsChild, 1);
childdata->widget = NULL;
childdata->ncols = ncols;
childdata->percentages = g_new(gint, ncols);
childdata->force_left = FALSE;
for (i = 0; i < ncols; i++)
childdata->percentages[i] = percentages[i];
cols->children = g_list_append(cols->children, childdata);
}
void columns_add(Columns *cols, GtkWidget *child,
gint colstart, gint colspan)
{
ColumnsChild *childdata;
g_return_if_fail(cols != NULL);
g_return_if_fail(IS_COLUMNS(cols));
g_return_if_fail(child != NULL);
g_return_if_fail(child->parent == NULL);
childdata = g_new(ColumnsChild, 1);
childdata->widget = child;
childdata->colstart = colstart;
childdata->colspan = colspan;
childdata->force_left = FALSE;
cols->children = g_list_append(cols->children, childdata);
cols->taborder = g_list_append(cols->taborder, child);
gtk_widget_set_parent(child, GTK_WIDGET(cols));
if (GTK_WIDGET_REALIZED(cols))
gtk_widget_realize(child);
if (GTK_WIDGET_VISIBLE(cols) && GTK_WIDGET_VISIBLE(child)) {
if (GTK_WIDGET_MAPPED(cols))
gtk_widget_map(child);
gtk_widget_queue_resize(child);
}
}
void columns_force_left_align(Columns *cols, GtkWidget *widget)
{
ColumnsChild *child;
GList *children;
g_return_if_fail(cols != NULL);
g_return_if_fail(IS_COLUMNS(cols));
g_return_if_fail(widget != NULL);
for (children = cols->children;
children && (child = children->data);
children = children->next) {
if (child->widget != widget)
continue;
child->force_left = TRUE;
if (GTK_WIDGET_VISIBLE(widget))
gtk_widget_queue_resize(GTK_WIDGET(cols));
break;
}
}
void columns_taborder_last(Columns *cols, GtkWidget *widget)
{
GtkWidget *childw;
GList *children;
g_return_if_fail(cols != NULL);
g_return_if_fail(IS_COLUMNS(cols));
g_return_if_fail(widget != NULL);
for (children = cols->taborder;
children && (childw = children->data);
children = children->next) {
if (childw != widget)
continue;
cols->taborder = g_list_remove_link(cols->taborder, children);
g_list_free(children);
cols->taborder = g_list_append(cols->taborder, widget);
break;
}
}
/*
* Override GtkContainer's focus movement so the user can
* explicitly specify the tab order.
*/
static gint columns_focus(GtkContainer *container, GtkDirectionType dir)
{
Columns *cols;
GList *pos;
GtkWidget *focuschild;
g_return_val_if_fail(container != NULL, FALSE);
g_return_val_if_fail(IS_COLUMNS(container), FALSE);
cols = COLUMNS(container);
if (!GTK_WIDGET_DRAWABLE(cols) ||
!GTK_WIDGET_IS_SENSITIVE(cols))
return FALSE;
if (!GTK_WIDGET_CAN_FOCUS(container) &&
(dir == GTK_DIR_TAB_FORWARD || dir == GTK_DIR_TAB_BACKWARD)) {
focuschild = container->focus_child;
gtk_container_set_focus_child(container, NULL);
if (dir == GTK_DIR_TAB_FORWARD)
pos = cols->taborder;
else
pos = g_list_last(cols->taborder);
while (pos) {
GtkWidget *child = pos->data;
if (focuschild) {
if (focuschild == child) {
focuschild = NULL; /* now we can start looking in here */
if (GTK_WIDGET_DRAWABLE(child) &&
GTK_IS_CONTAINER(child) &&
!GTK_WIDGET_HAS_FOCUS(child)) {
if (gtk_container_focus(GTK_CONTAINER(child), dir))
return TRUE;
}
}
} else if (GTK_WIDGET_DRAWABLE(child)) {
if (GTK_IS_CONTAINER(child)) {
if (gtk_container_focus(GTK_CONTAINER(child), dir))
return TRUE;
} else if (GTK_WIDGET_CAN_FOCUS(child)) {
gtk_widget_grab_focus(child);
return TRUE;
}
}
if (dir == GTK_DIR_TAB_FORWARD)
pos = pos->next;
else
pos = pos->prev;
}
return FALSE;
} else
return columns_inherited_focus(container, dir);
}
/*
* Now here comes the interesting bit. The actual layout part is
* done in the following two functions:
*
* columns_size_request() examines the list of widgets held in the
* Columns, and returns a requisition stating the absolute minimum
* size it can bear to be.
*
* columns_size_allocate() is given an allocation telling it what
* size the whole container is going to be, and it calls
* gtk_widget_size_allocate() on all of its (visible) children to
* set their size and position relative to the top left of the
* container.
*/
static void columns_size_request(GtkWidget *widget, GtkRequisition *req)
{
Columns *cols;
ColumnsChild *child;
GList *children;
gint i, ncols, colspan, *colypos;
const gint *percentages;
static const gint onecol[] = { 100 };
g_return_if_fail(widget != NULL);
g_return_if_fail(IS_COLUMNS(widget));
g_return_if_fail(req != NULL);
cols = COLUMNS(widget);
req->width = 0;
req->height = cols->spacing;
ncols = 1;
colypos = g_new(gint, 1);
colypos[0] = 0;
percentages = onecol;
for (children = cols->children;
children && (child = children->data);
children = children->next) {
GtkRequisition creq;
if (!child->widget) {
/* Column reconfiguration. */
for (i = 1; i < ncols; i++) {
if (colypos[0] < colypos[i])
colypos[0] = colypos[i];
}
ncols = child->ncols;
percentages = child->percentages;
colypos = g_renew(gint, colypos, ncols);
for (i = 1; i < ncols; i++)
colypos[i] = colypos[0];
continue;
}
/* Only take visible widgets into account. */
if (!GTK_WIDGET_VISIBLE(child->widget))
continue;
gtk_widget_size_request(child->widget, &creq);
colspan = child->colspan ? child->colspan : ncols-child->colstart;
/*
* To compute width: we know that creq.width plus
* cols->spacing needs to equal a certain percentage of the
* full width of the container. So we work this value out,
* figure out how wide the container will need to be to
* make that percentage of it equal to that width, and
* ensure our returned width is at least that much. Very
* simple really.
*/
{
int percent, thiswid, fullwid;
percent = 0;
for (i = 0; i < colspan; i++)
percent += percentages[child->colstart+i];
thiswid = creq.width + cols->spacing;
/*
* Since creq is the _minimum_ size the child needs, we
* must ensure that it gets _at least_ that size.
* Hence, when scaling thiswid up to fullwid, we must
* round up, which means adding percent-1 before
* dividing by percent.
*/
fullwid = (thiswid * 100 + percent - 1) / percent;
/*
* The above calculation assumes every widget gets
* cols->spacing on the right. So we subtract
* cols->spacing here to account for the extra load of
* spacing on the right.
*/
if (req->width < fullwid - cols->spacing)
req->width = fullwid - cols->spacing;
}
/*
* To compute height: the widget's top will be positioned
* at the largest y value so far reached in any of the
* columns it crosses. Then it will go down by creq.height
* plus padding; and the point it reaches at the bottom is
* the new y value in all those columns, and minus the
* padding it is also a lower bound on our own size
* request.
*/
{
int topy, boty;
topy = 0;
for (i = 0; i < colspan; i++) {
if (topy < colypos[child->colstart+i])
topy = colypos[child->colstart+i];
}
boty = topy + creq.height + cols->spacing;
for (i = 0; i < colspan; i++) {
colypos[child->colstart+i] = boty;
}
if (req->height < boty - cols->spacing)
req->height = boty - cols->spacing;
}
}
req->width += 2*GTK_CONTAINER(cols)->border_width;
req->height += 2*GTK_CONTAINER(cols)->border_width;
g_free(colypos);
}
static void columns_size_allocate(GtkWidget *widget, GtkAllocation *alloc)
{
Columns *cols;
ColumnsChild *child;
GList *children;
gint i, ncols, colspan, border, *colxpos, *colypos;
const gint *percentages;
static const gint onecol[] = { 100 };
g_return_if_fail(widget != NULL);
g_return_if_fail(IS_COLUMNS(widget));
g_return_if_fail(alloc != NULL);
cols = COLUMNS(widget);
widget->allocation = *alloc;
border = GTK_CONTAINER(cols)->border_width;
ncols = 1;
percentages = onecol;
/* colxpos gives the starting x position of each column.
* We supply n+1 of them, so that we can find the RH edge easily.
* All ending x positions are expected to be adjusted afterwards by
* subtracting the spacing. */
colxpos = g_new(gint, 2);
colxpos[0] = 0;
colxpos[1] = alloc->width - 2*border + cols->spacing;
/* As in size_request, colypos is the lowest y reached in each column. */
colypos = g_new(gint, 1);
colypos[0] = 0;
for (children = cols->children;
children && (child = children->data);
children = children->next) {
GtkRequisition creq;
GtkAllocation call;
if (!child->widget) {
gint percent;
/* Column reconfiguration. */
for (i = 1; i < ncols; i++) {
if (colypos[0] < colypos[i])
colypos[0] = colypos[i];
}
ncols = child->ncols;
percentages = child->percentages;
colypos = g_renew(gint, colypos, ncols);
for (i = 1; i < ncols; i++)
colypos[i] = colypos[0];
colxpos = g_renew(gint, colxpos, ncols + 1);
colxpos[0] = 0;
percent = 0;
for (i = 0; i < ncols; i++) {
percent += percentages[i];
colxpos[i+1] = (((alloc->width - 2*border) + cols->spacing)
* percent / 100);
}
continue;
}
/* Only take visible widgets into account. */
if (!GTK_WIDGET_VISIBLE(child->widget))
continue;
gtk_widget_get_child_requisition(child->widget, &creq);
colspan = child->colspan ? child->colspan : ncols-child->colstart;
/*
* Starting x position is cols[colstart].
* Ending x position is cols[colstart+colspan] - spacing.
*
* Unless we're forcing left, in which case the width is
* exactly the requisition width.
*/
call.x = alloc->x + border + colxpos[child->colstart];
if (child->force_left)
call.width = creq.width;
else
call.width = (colxpos[child->colstart+colspan] -
colxpos[child->colstart] - cols->spacing);
/*
* To compute height: the widget's top will be positioned
* at the largest y value so far reached in any of the
* columns it crosses. Then it will go down by creq.height
* plus padding; and the point it reaches at the bottom is
* the new y value in all those columns.
*/
{
int topy, boty;
topy = 0;
for (i = 0; i < colspan; i++) {
if (topy < colypos[child->colstart+i])
topy = colypos[child->colstart+i];
}
call.y = alloc->y + border + topy;
call.height = creq.height;
boty = topy + creq.height + cols->spacing;
for (i = 0; i < colspan; i++) {
colypos[child->colstart+i] = boty;
}
}
gtk_widget_size_allocate(child->widget, &call);
}
g_free(colxpos);
g_free(colypos);
}

62
puttysrc/UNIX/GTKCOLS.H Normal file
View File

@@ -0,0 +1,62 @@
/*
* gtkcols.h - header file for a columns-based widget container
* capable of supporting the PuTTY portable dialog box layout
* mechanism.
*/
#ifndef COLUMNS_H
#define COLUMNS_H
#include <gdk/gdk.h>
#include <gtk/gtkcontainer.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define TYPE_COLUMNS (columns_get_type())
#define COLUMNS(obj) (GTK_CHECK_CAST((obj), TYPE_COLUMNS, Columns))
#define COLUMNS_CLASS(klass) \
(GTK_CHECK_CLASS_CAST((klass), TYPE_COLUMNS, ColumnsClass))
#define IS_COLUMNS(obj) (GTK_CHECK_TYPE((obj), TYPE_COLUMNS))
#define IS_COLUMNS_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), TYPE_COLUMNS))
typedef struct Columns_tag Columns;
typedef struct ColumnsClass_tag ColumnsClass;
typedef struct ColumnsChild_tag ColumnsChild;
struct Columns_tag {
GtkContainer container;
/* private after here */
GList *children; /* this holds ColumnsChild structures */
GList *taborder; /* this just holds GtkWidgets */
gint spacing;
};
struct ColumnsClass_tag {
GtkContainerClass parent_class;
};
struct ColumnsChild_tag {
/* If `widget' is non-NULL, this entry represents an actual widget. */
GtkWidget *widget;
gint colstart, colspan;
gboolean force_left; /* for recalcitrant GtkLabels */
/* Otherwise, this entry represents a change in the column setup. */
gint ncols;
gint *percentages;
};
GtkType columns_get_type(void);
GtkWidget *columns_new(gint spacing);
void columns_set_cols(Columns *cols, gint ncols, const gint *percentages);
void columns_add(Columns *cols, GtkWidget *child,
gint colstart, gint colspan);
void columns_taborder_last(Columns *cols, GtkWidget *child);
void columns_force_left_align(Columns *cols, GtkWidget *child);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* COLUMNS_H */

2903
puttysrc/UNIX/GTKDLG.C Normal file

File diff suppressed because it is too large Load Diff

3700
puttysrc/UNIX/GTKWIN.C Normal file

File diff suppressed because it is too large Load Diff

942
puttysrc/UNIX/MAKEFILE.GTK Normal file
View File

@@ -0,0 +1,942 @@
# Makefile for putty under X/GTK and Unix.
#
# 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.
#
# You can define this path to point at your tools if you need to
# TOOLPATH = /opt/gcc/bin
CC = $(TOOLPATH)cc
CFLAGS = -O2 -Wall -Werror -g -I.././ -I../charset/ -I../windows/ -I../unix/ \
-I../mac/ -I../macosx/ `gtk-config --cflags` -D _FILE_OFFSET_BITS=64
XLDFLAGS = $(LDFLAGS) `gtk-config --libs`
ULDFLAGS = $(LDFLAGS)
INSTALL=install
INSTALL_PROGRAM=$(INSTALL)
INSTALL_DATA=$(INSTALL)
prefix=/usr/local
exec_prefix=$(prefix)
bindir=$(exec_prefix)/bin
mandir=$(prefix)/man
man1dir=$(mandir)/man1
.SUFFIXES:
all: plink pscp psftp pterm putty puttygen puttytel
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) -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 \
$(ULDFLAGS)
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) -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 $(ULDFLAGS)
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) -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 $(ULDFLAGS)
pterm: be_none.o cmdline.o config.o dialog.o fromucs.o gtkcfg.o gtkcols.o \
gtkdlg.o gtkwin.o ldisc.o ldiscucs.o localenc.o logging.o \
macenc.o mimeenc.o minibidi.o misc.o nocproxy.o sbcs.o \
sbcsdat.o sercfg.o settings.o slookup.o terminal.o time.o \
timing.o toucs.o tree234.o utf8.o uxcfg.o uxmisc.o uxprint.o \
uxpterm.o uxpty.o uxsel.o uxsignal.o uxstore.o uxucs.o \
version.o wcwidth.o xenc.o xkeysym.o xpmptcfg.o xpmpterm.o
$(CC) -o $@ be_none.o cmdline.o config.o dialog.o fromucs.o gtkcfg.o \
gtkcols.o gtkdlg.o gtkwin.o ldisc.o ldiscucs.o localenc.o \
logging.o macenc.o mimeenc.o minibidi.o misc.o nocproxy.o \
sbcs.o sbcsdat.o sercfg.o settings.o slookup.o terminal.o \
time.o timing.o toucs.o tree234.o utf8.o uxcfg.o uxmisc.o \
uxprint.o uxpterm.o uxpty.o uxsel.o uxsignal.o uxstore.o \
uxucs.o version.o wcwidth.o xenc.o xkeysym.o xpmptcfg.o \
xpmpterm.o $(XLDFLAGS)
putty: be_all_s.o cmdline.o config.o cproxy.o dialog.o fromucs.o gtkcfg.o \
gtkcols.o gtkdlg.o gtkwin.o ldisc.o ldiscucs.o localenc.o \
logging.o macenc.o mimeenc.o minibidi.o misc.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 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 uxputty.o \
uxsel.o uxser.o uxsignal.o uxstore.o uxucs.o version.o \
wcwidth.o wildcard.o x11fwd.o xenc.o xkeysym.o xpmpucfg.o \
xpmputty.o
$(CC) -o $@ be_all_s.o cmdline.o config.o cproxy.o dialog.o \
fromucs.o gtkcfg.o gtkcols.o gtkdlg.o gtkwin.o ldisc.o \
ldiscucs.o localenc.o logging.o macenc.o mimeenc.o \
minibidi.o misc.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 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 uxputty.o uxsel.o uxser.o uxsignal.o uxstore.o \
uxucs.o version.o wcwidth.o wildcard.o x11fwd.o xenc.o \
xkeysym.o xpmpucfg.o xpmputty.o $(XLDFLAGS)
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) -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 $(ULDFLAGS)
puttytel: be_nos_s.o cmdline.o config.o dialog.o fromucs.o gtkcfg.o \
gtkcols.o gtkdlg.o gtkwin.o ldisc.o ldiscucs.o localenc.o \
logging.o macenc.o mimeenc.o minibidi.o misc.o nocproxy.o \
pinger.o proxy.o raw.o rlogin.o sbcs.o sbcsdat.o sercfg.o \
settings.o slookup.o telnet.o terminal.o time.o timing.o \
toucs.o tree234.o utf8.o uxcfg.o uxmisc.o uxnet.o uxprint.o \
uxproxy.o uxputty.o uxsel.o uxser.o uxsignal.o uxstore.o \
uxucs.o version.o wcwidth.o xenc.o xkeysym.o xpmpucfg.o \
xpmputty.o
$(CC) -o $@ be_nos_s.o cmdline.o config.o dialog.o fromucs.o \
gtkcfg.o gtkcols.o gtkdlg.o gtkwin.o ldisc.o ldiscucs.o \
localenc.o logging.o macenc.o mimeenc.o minibidi.o misc.o \
nocproxy.o pinger.o proxy.o raw.o rlogin.o sbcs.o sbcsdat.o \
sercfg.o settings.o slookup.o telnet.o terminal.o time.o \
timing.o toucs.o tree234.o utf8.o uxcfg.o uxmisc.o uxnet.o \
uxprint.o uxproxy.o uxputty.o uxsel.o uxser.o uxsignal.o \
uxstore.o uxucs.o version.o wcwidth.o xenc.o xkeysym.o \
xpmpucfg.o xpmputty.o $(XLDFLAGS)
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) $(CFLAGS) $(XFLAGS) -c ../be_all.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) $(CFLAGS) $(XFLAGS) -c ../be_all_s.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) $(CFLAGS) $(XFLAGS) -c ../be_none.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) $(CFLAGS) $(XFLAGS) -c ../be_nos_s.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) $(CFLAGS) $(XFLAGS) -c ../be_nossh.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) $(CFLAGS) $(XFLAGS) -c ../cmdgen.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) $(CFLAGS) $(XFLAGS) -c ../cmdline.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) $(CFLAGS) $(XFLAGS) -c ../config.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) $(CFLAGS) $(XFLAGS) -c ../cproxy.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) $(CFLAGS) $(XFLAGS) -c ../dialog.c
fromucs.o: ../charset/fromucs.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/fromucs.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) $(CFLAGS) $(XFLAGS) -c ../unix/gtkcfg.c
gtkcols.o: ../unix/gtkcols.c ../unix/gtkcols.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../unix/gtkcols.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) $(CFLAGS) $(XFLAGS) -c ../unix/gtkdlg.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) $(CFLAGS) $(XFLAGS) -c ../unix/gtkwin.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) $(CFLAGS) $(XFLAGS) -c ../import.c
int64.o: ../int64.c ../int64.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../int64.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) $(CFLAGS) $(XFLAGS) -c ../ldisc.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) $(CFLAGS) $(XFLAGS) -c ../ldiscucs.c
localenc.o: ../charset/localenc.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/localenc.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) $(CFLAGS) $(XFLAGS) -c ../logging.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) $(CFLAGS) $(XFLAGS) -c ../mac/mac.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) $(CFLAGS) $(XFLAGS) -c ../mac/macabout.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) $(CFLAGS) $(XFLAGS) -c ../mac/macctrls.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) $(CFLAGS) $(XFLAGS) -c ../mac/macdlg.c
macenc.o: ../charset/macenc.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/macenc.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) $(CFLAGS) $(XFLAGS) -c ../mac/macevlog.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) $(CFLAGS) $(XFLAGS) -c ../mac/macmisc.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) $(CFLAGS) $(XFLAGS) -c ../mac/macnet.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) $(CFLAGS) $(XFLAGS) -c ../mac/macnoise.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) $(CFLAGS) $(XFLAGS) -c ../mac/macpgen.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) $(CFLAGS) $(XFLAGS) -c ../mac/macpgkey.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) $(CFLAGS) $(XFLAGS) -c ../mac/macstore.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) $(CFLAGS) $(XFLAGS) -c ../mac/macterm.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) $(CFLAGS) $(XFLAGS) -c ../mac/macucs.c
mimeenc.o: ../charset/mimeenc.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/mimeenc.c
minibidi.o: ../minibidi.c ../misc.h ../puttymem.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../minibidi.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) $(CFLAGS) $(XFLAGS) -c ../misc.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) $(CFLAGS) $(XFLAGS) -c ../mac/mtcpnet.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) $(CFLAGS) $(XFLAGS) -c ../nocproxy.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) $(CFLAGS) $(XFLAGS) -c ../notiming.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) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../macosx/osxctrls.m
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) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../macosx/osxdlg.m
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) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../macosx/osxmain.m
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) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../macosx/osxsel.m
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) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../macosx/osxwin.m
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) $(CFLAGS) $(XFLAGS) -c ../mac/otnet.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) $(CFLAGS) $(XFLAGS) -c ../pinger.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) $(CFLAGS) $(XFLAGS) -c ../portfwd.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) $(CFLAGS) $(XFLAGS) -c ../pproxy.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) $(CFLAGS) $(XFLAGS) -c ../proxy.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) $(CFLAGS) $(XFLAGS) -c ../pscp.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) $(CFLAGS) $(XFLAGS) -c ../psftp.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) $(CFLAGS) $(XFLAGS) -c ../raw.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) $(CFLAGS) $(XFLAGS) -c ../rlogin.c
sbcs.o: ../charset/sbcs.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/sbcs.c
sbcsdat.o: ../charset/sbcsdat.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/sbcsdat.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) $(CFLAGS) $(XFLAGS) -c ../sercfg.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) $(CFLAGS) $(XFLAGS) -c ../settings.c
sftp.o: ../sftp.c ../misc.h ../int64.h ../tree234.h ../sftp.h ../puttymem.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sftp.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) $(CFLAGS) $(XFLAGS) -c ../windows/sizetip.c
slookup.o: ../charset/slookup.c ../charset/charset.h ../charset/internal.h \
../charset/enum.c ../charset/sbcsdat.c ../charset/utf8.c
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/slookup.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) $(CFLAGS) $(XFLAGS) -c ../ssh.c
sshaes.o: ../sshaes.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshaes.c
ssharcf.o: ../ssharcf.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../ssharcf.c
sshblowf.o: ../sshblowf.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshblowf.c
sshbn.o: ../sshbn.c ../misc.h ../ssh.h ../puttymem.h ../network.h ../int64.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshbn.c
sshcrc.o: ../sshcrc.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshcrc.c
sshcrcda.o: ../sshcrcda.c ../misc.h ../ssh.h ../puttymem.h ../network.h \
../int64.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshcrcda.c
sshdes.o: ../sshdes.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshdes.c
sshdh.o: ../sshdh.c ../ssh.h ../puttymem.h ../network.h ../int64.h ../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshdh.c
sshdss.o: ../sshdss.c ../ssh.h ../misc.h ../puttymem.h ../network.h \
../int64.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshdss.c
sshdssg.o: ../sshdssg.c ../misc.h ../ssh.h ../puttymem.h ../network.h \
../int64.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshdssg.c
sshmd5.o: ../sshmd5.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshmd5.c
sshprime.o: ../sshprime.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshprime.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) $(CFLAGS) $(XFLAGS) -c ../sshpubk.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) $(CFLAGS) $(XFLAGS) -c ../sshrand.c
sshrsa.o: ../sshrsa.c ../ssh.h ../misc.h ../puttymem.h ../network.h \
../int64.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshrsa.c
sshrsag.o: ../sshrsag.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshrsag.c
sshsh256.o: ../sshsh256.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshsh256.c
sshsh512.o: ../sshsh512.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshsh512.c
sshsha.o: ../sshsha.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshsha.c
sshzlib.o: ../sshzlib.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshzlib.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) $(CFLAGS) $(XFLAGS) -c ../mac/stricmp.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) $(CFLAGS) $(XFLAGS) -c ../telnet.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) $(CFLAGS) $(XFLAGS) -c ../terminal.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) $(CFLAGS) $(XFLAGS) -c ../testback.c
time.o: ../time.c
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../time.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) $(CFLAGS) $(XFLAGS) -c ../timing.c
toucs.o: ../charset/toucs.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/toucs.c
tree234.o: ../tree234.c ../puttymem.h ../tree234.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../tree234.c
utf8.o: ../charset/utf8.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/utf8.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) $(CFLAGS) $(XFLAGS) -c ../unix/ux_x11.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxagentc.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxcfg.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxcons.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxgen.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxmisc.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxnet.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxnoise.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxplink.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxprint.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxproxy.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxpterm.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxpty.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxputty.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxsel.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxser.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxsftp.c
uxsignal.o: ../unix/uxsignal.c
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../unix/uxsignal.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxstore.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxucs.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) $(CFLAGS) $(XFLAGS) -c ../mac/vsnprint.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) $(CFLAGS) $(XFLAGS) -c ../wcwidth.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) $(CFLAGS) $(XFLAGS) -c ../wildcard.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) $(CFLAGS) $(XFLAGS) -c ../windows/wincfg.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) $(CFLAGS) $(XFLAGS) -c ../windows/wincons.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) $(CFLAGS) $(XFLAGS) -c ../windows/winctrls.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) $(CFLAGS) $(XFLAGS) -c ../windows/windefs.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) $(CFLAGS) $(XFLAGS) -c ../windows/windlg.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) $(CFLAGS) $(XFLAGS) -c ../windows/window.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) $(CFLAGS) $(XFLAGS) -c ../windows/winhandl.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) $(CFLAGS) $(XFLAGS) -c ../windows/winhelp.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) $(CFLAGS) $(XFLAGS) -c ../windows/winmisc.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) $(CFLAGS) $(XFLAGS) -c ../windows/winnet.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) $(CFLAGS) $(XFLAGS) -c ../windows/winnoise.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) $(CFLAGS) $(XFLAGS) -c ../windows/winpgen.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) $(CFLAGS) $(XFLAGS) -c ../windows/winpgnt.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) $(CFLAGS) $(XFLAGS) -c ../windows/winpgntc.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) $(CFLAGS) $(XFLAGS) -c ../windows/winplink.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) $(CFLAGS) $(XFLAGS) -c ../windows/winprint.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) $(CFLAGS) $(XFLAGS) -c ../windows/winproxy.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) $(CFLAGS) $(XFLAGS) -c ../windows/winser.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) $(CFLAGS) $(XFLAGS) -c ../windows/winsftp.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) $(CFLAGS) $(XFLAGS) -c ../windows/winstore.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) $(CFLAGS) $(XFLAGS) -c ../windows/wintime.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) $(CFLAGS) $(XFLAGS) -c ../windows/winucs.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) $(CFLAGS) $(XFLAGS) -c ../windows/winutils.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) $(CFLAGS) $(XFLAGS) -c ../x11fwd.c
xenc.o: ../charset/xenc.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/xenc.c
xkeysym.o: ../unix/xkeysym.c ../misc.h ../puttymem.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../unix/xkeysym.c
xpmptcfg.o: ../unix/xpmptcfg.c
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../unix/xpmptcfg.c
xpmpterm.o: ../unix/xpmpterm.c
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../unix/xpmpterm.c
xpmpucfg.o: ../unix/xpmpucfg.c
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../unix/xpmpucfg.c
xpmputty.o: ../unix/xpmputty.c
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../unix/xpmputty.c
version.o: FORCE
if test -z "$(VER)" && (cd ..; md5sum -c manifest); then \
$(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat ../version.def` -c ../version.c; \
else \
$(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c ../version.c; \
fi
install:
$(INSTALL_PROGRAM) -m 755 plink $(DESTDIR)$(bindir)/plink
$(INSTALL_PROGRAM) -m 755 pscp $(DESTDIR)$(bindir)/pscp
$(INSTALL_PROGRAM) -m 755 psftp $(DESTDIR)$(bindir)/psftp
$(INSTALL_PROGRAM) -m 755 pterm $(DESTDIR)$(bindir)/pterm
if test -n "$(UTMP_GROUP)"; then \
chgrp $(UTMP_GROUP) $(DESTDIR)$(bindir)/pterm && \
chmod 2755 $(DESTDIR)$(bindir)/pterm; \
elif test -n "$(UTMP_USER)"; then \
chown $(UTMP_USER) $(DESTDIR)$(bindir)/pterm && \
chmod 4755 $(DESTDIR)$(bindir)/pterm; \
fi
$(INSTALL_PROGRAM) -m 755 putty $(DESTDIR)$(bindir)/putty
$(INSTALL_PROGRAM) -m 755 puttygen $(DESTDIR)$(bindir)/puttygen
$(INSTALL_PROGRAM) -m 755 puttytel $(DESTDIR)$(bindir)/puttytel
$(INSTALL_DATA) -m 644 ../doc/plink.1 $(DESTDIR)$(man1dir)/plink.1
$(INSTALL_DATA) -m 644 ../doc/pscp.1 $(DESTDIR)$(man1dir)/pscp.1
$(INSTALL_DATA) -m 644 ../doc/psftp.1 $(DESTDIR)$(man1dir)/psftp.1
$(INSTALL_DATA) -m 644 ../doc/pterm.1 $(DESTDIR)$(man1dir)/pterm.1
$(INSTALL_DATA) -m 644 ../doc/putty.1 $(DESTDIR)$(man1dir)/putty.1
$(INSTALL_DATA) -m 644 ../doc/puttygen.1 $(DESTDIR)$(man1dir)/puttygen.1
$(INSTALL_DATA) -m 644 ../doc/puttytel.1 $(DESTDIR)$(man1dir)/puttytel.1
install-strip:
$(MAKE) install INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s"
clean:
rm -f *.o plink pscp psftp pterm putty puttygen puttytel
FORCE:

942
puttysrc/UNIX/MAKEFILE.IN Normal file
View File

@@ -0,0 +1,942 @@
# Makefile.in for putty under Unix with Autoconf.
#
# 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 = @CC@
CFLAGS = @CFLAGS@ @CPPFLAGS@ @DEFS@ @GTK_CFLAGS@ -I.././ -I../charset/ \
-I../windows/ -I../unix/ -I../mac/ -I../macosx/
XLDFLAGS = @LDFLAGS@ @LIBS@ @GTK_LIBS@
ULDFLAGS = @LDFLAGS@ @LIBS@
INSTALL=@INSTALL@
INSTALL_PROGRAM=$(INSTALL)
INSTALL_DATA=$(INSTALL)
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
mandir=@mandir@
man1dir=$(mandir)/man1
.SUFFIXES:
all: @all_targets@
all-cli: plink pscp psftp puttygen
all-gtk: pterm putty puttytel
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) -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 \
$(ULDFLAGS)
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) -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 $(ULDFLAGS)
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) -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 $(ULDFLAGS)
pterm: be_none.o cmdline.o config.o dialog.o fromucs.o gtkcfg.o gtkcols.o \
gtkdlg.o gtkwin.o ldisc.o ldiscucs.o localenc.o logging.o \
macenc.o mimeenc.o minibidi.o misc.o nocproxy.o sbcs.o \
sbcsdat.o sercfg.o settings.o slookup.o terminal.o time.o \
timing.o toucs.o tree234.o utf8.o uxcfg.o uxmisc.o uxprint.o \
uxpterm.o uxpty.o uxsel.o uxsignal.o uxstore.o uxucs.o \
version.o wcwidth.o xenc.o xkeysym.o xpmptcfg.o xpmpterm.o
$(CC) -o $@ be_none.o cmdline.o config.o dialog.o fromucs.o gtkcfg.o \
gtkcols.o gtkdlg.o gtkwin.o ldisc.o ldiscucs.o localenc.o \
logging.o macenc.o mimeenc.o minibidi.o misc.o nocproxy.o \
sbcs.o sbcsdat.o sercfg.o settings.o slookup.o terminal.o \
time.o timing.o toucs.o tree234.o utf8.o uxcfg.o uxmisc.o \
uxprint.o uxpterm.o uxpty.o uxsel.o uxsignal.o uxstore.o \
uxucs.o version.o wcwidth.o xenc.o xkeysym.o xpmptcfg.o \
xpmpterm.o $(XLDFLAGS)
putty: be_all_s.o cmdline.o config.o cproxy.o dialog.o fromucs.o gtkcfg.o \
gtkcols.o gtkdlg.o gtkwin.o ldisc.o ldiscucs.o localenc.o \
logging.o macenc.o mimeenc.o minibidi.o misc.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 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 uxputty.o \
uxsel.o uxser.o uxsignal.o uxstore.o uxucs.o version.o \
wcwidth.o wildcard.o x11fwd.o xenc.o xkeysym.o xpmpucfg.o \
xpmputty.o
$(CC) -o $@ be_all_s.o cmdline.o config.o cproxy.o dialog.o \
fromucs.o gtkcfg.o gtkcols.o gtkdlg.o gtkwin.o ldisc.o \
ldiscucs.o localenc.o logging.o macenc.o mimeenc.o \
minibidi.o misc.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 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 uxputty.o uxsel.o uxser.o uxsignal.o uxstore.o \
uxucs.o version.o wcwidth.o wildcard.o x11fwd.o xenc.o \
xkeysym.o xpmpucfg.o xpmputty.o $(XLDFLAGS)
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) -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 $(ULDFLAGS)
puttytel: be_nos_s.o cmdline.o config.o dialog.o fromucs.o gtkcfg.o \
gtkcols.o gtkdlg.o gtkwin.o ldisc.o ldiscucs.o localenc.o \
logging.o macenc.o mimeenc.o minibidi.o misc.o nocproxy.o \
pinger.o proxy.o raw.o rlogin.o sbcs.o sbcsdat.o sercfg.o \
settings.o slookup.o telnet.o terminal.o time.o timing.o \
toucs.o tree234.o utf8.o uxcfg.o uxmisc.o uxnet.o uxprint.o \
uxproxy.o uxputty.o uxsel.o uxser.o uxsignal.o uxstore.o \
uxucs.o version.o wcwidth.o xenc.o xkeysym.o xpmpucfg.o \
xpmputty.o
$(CC) -o $@ be_nos_s.o cmdline.o config.o dialog.o fromucs.o \
gtkcfg.o gtkcols.o gtkdlg.o gtkwin.o ldisc.o ldiscucs.o \
localenc.o logging.o macenc.o mimeenc.o minibidi.o misc.o \
nocproxy.o pinger.o proxy.o raw.o rlogin.o sbcs.o sbcsdat.o \
sercfg.o settings.o slookup.o telnet.o terminal.o time.o \
timing.o toucs.o tree234.o utf8.o uxcfg.o uxmisc.o uxnet.o \
uxprint.o uxproxy.o uxputty.o uxsel.o uxser.o uxsignal.o \
uxstore.o uxucs.o version.o wcwidth.o xenc.o xkeysym.o \
xpmpucfg.o xpmputty.o $(XLDFLAGS)
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) $(CFLAGS) $(XFLAGS) -c ../be_all.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) $(CFLAGS) $(XFLAGS) -c ../be_all_s.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) $(CFLAGS) $(XFLAGS) -c ../be_none.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) $(CFLAGS) $(XFLAGS) -c ../be_nos_s.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) $(CFLAGS) $(XFLAGS) -c ../be_nossh.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) $(CFLAGS) $(XFLAGS) -c ../cmdgen.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) $(CFLAGS) $(XFLAGS) -c ../cmdline.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) $(CFLAGS) $(XFLAGS) -c ../config.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) $(CFLAGS) $(XFLAGS) -c ../cproxy.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) $(CFLAGS) $(XFLAGS) -c ../dialog.c
fromucs.o: ../charset/fromucs.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/fromucs.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) $(CFLAGS) $(XFLAGS) -c ../unix/gtkcfg.c
gtkcols.o: ../unix/gtkcols.c ../unix/gtkcols.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../unix/gtkcols.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) $(CFLAGS) $(XFLAGS) -c ../unix/gtkdlg.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) $(CFLAGS) $(XFLAGS) -c ../unix/gtkwin.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) $(CFLAGS) $(XFLAGS) -c ../import.c
int64.o: ../int64.c ../int64.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../int64.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) $(CFLAGS) $(XFLAGS) -c ../ldisc.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) $(CFLAGS) $(XFLAGS) -c ../ldiscucs.c
localenc.o: ../charset/localenc.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/localenc.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) $(CFLAGS) $(XFLAGS) -c ../logging.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) $(CFLAGS) $(XFLAGS) -c ../mac/mac.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) $(CFLAGS) $(XFLAGS) -c ../mac/macabout.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) $(CFLAGS) $(XFLAGS) -c ../mac/macctrls.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) $(CFLAGS) $(XFLAGS) -c ../mac/macdlg.c
macenc.o: ../charset/macenc.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/macenc.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) $(CFLAGS) $(XFLAGS) -c ../mac/macevlog.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) $(CFLAGS) $(XFLAGS) -c ../mac/macmisc.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) $(CFLAGS) $(XFLAGS) -c ../mac/macnet.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) $(CFLAGS) $(XFLAGS) -c ../mac/macnoise.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) $(CFLAGS) $(XFLAGS) -c ../mac/macpgen.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) $(CFLAGS) $(XFLAGS) -c ../mac/macpgkey.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) $(CFLAGS) $(XFLAGS) -c ../mac/macstore.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) $(CFLAGS) $(XFLAGS) -c ../mac/macterm.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) $(CFLAGS) $(XFLAGS) -c ../mac/macucs.c
mimeenc.o: ../charset/mimeenc.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/mimeenc.c
minibidi.o: ../minibidi.c ../misc.h ../puttymem.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../minibidi.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) $(CFLAGS) $(XFLAGS) -c ../misc.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) $(CFLAGS) $(XFLAGS) -c ../mac/mtcpnet.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) $(CFLAGS) $(XFLAGS) -c ../nocproxy.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) $(CFLAGS) $(XFLAGS) -c ../notiming.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) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../macosx/osxctrls.m
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) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../macosx/osxdlg.m
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) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../macosx/osxmain.m
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) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../macosx/osxsel.m
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) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../macosx/osxwin.m
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) $(CFLAGS) $(XFLAGS) -c ../mac/otnet.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) $(CFLAGS) $(XFLAGS) -c ../pinger.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) $(CFLAGS) $(XFLAGS) -c ../portfwd.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) $(CFLAGS) $(XFLAGS) -c ../pproxy.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) $(CFLAGS) $(XFLAGS) -c ../proxy.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) $(CFLAGS) $(XFLAGS) -c ../pscp.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) $(CFLAGS) $(XFLAGS) -c ../psftp.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) $(CFLAGS) $(XFLAGS) -c ../raw.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) $(CFLAGS) $(XFLAGS) -c ../rlogin.c
sbcs.o: ../charset/sbcs.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/sbcs.c
sbcsdat.o: ../charset/sbcsdat.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/sbcsdat.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) $(CFLAGS) $(XFLAGS) -c ../sercfg.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) $(CFLAGS) $(XFLAGS) -c ../settings.c
sftp.o: ../sftp.c ../misc.h ../int64.h ../tree234.h ../sftp.h ../puttymem.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sftp.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) $(CFLAGS) $(XFLAGS) -c ../windows/sizetip.c
slookup.o: ../charset/slookup.c ../charset/charset.h ../charset/internal.h \
../charset/enum.c ../charset/sbcsdat.c ../charset/utf8.c
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/slookup.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) $(CFLAGS) $(XFLAGS) -c ../ssh.c
sshaes.o: ../sshaes.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshaes.c
ssharcf.o: ../ssharcf.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../ssharcf.c
sshblowf.o: ../sshblowf.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshblowf.c
sshbn.o: ../sshbn.c ../misc.h ../ssh.h ../puttymem.h ../network.h ../int64.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshbn.c
sshcrc.o: ../sshcrc.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshcrc.c
sshcrcda.o: ../sshcrcda.c ../misc.h ../ssh.h ../puttymem.h ../network.h \
../int64.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshcrcda.c
sshdes.o: ../sshdes.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshdes.c
sshdh.o: ../sshdh.c ../ssh.h ../puttymem.h ../network.h ../int64.h ../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshdh.c
sshdss.o: ../sshdss.c ../ssh.h ../misc.h ../puttymem.h ../network.h \
../int64.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshdss.c
sshdssg.o: ../sshdssg.c ../misc.h ../ssh.h ../puttymem.h ../network.h \
../int64.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshdssg.c
sshmd5.o: ../sshmd5.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshmd5.c
sshprime.o: ../sshprime.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshprime.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) $(CFLAGS) $(XFLAGS) -c ../sshpubk.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) $(CFLAGS) $(XFLAGS) -c ../sshrand.c
sshrsa.o: ../sshrsa.c ../ssh.h ../misc.h ../puttymem.h ../network.h \
../int64.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshrsa.c
sshrsag.o: ../sshrsag.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshrsag.c
sshsh256.o: ../sshsh256.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshsh256.c
sshsh512.o: ../sshsh512.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshsh512.c
sshsha.o: ../sshsha.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshsha.c
sshzlib.o: ../sshzlib.c ../ssh.h ../puttymem.h ../network.h ../int64.h \
../misc.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../sshzlib.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) $(CFLAGS) $(XFLAGS) -c ../mac/stricmp.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) $(CFLAGS) $(XFLAGS) -c ../telnet.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) $(CFLAGS) $(XFLAGS) -c ../terminal.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) $(CFLAGS) $(XFLAGS) -c ../testback.c
time.o: ../time.c
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../time.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) $(CFLAGS) $(XFLAGS) -c ../timing.c
toucs.o: ../charset/toucs.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/toucs.c
tree234.o: ../tree234.c ../puttymem.h ../tree234.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../tree234.c
utf8.o: ../charset/utf8.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/utf8.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) $(CFLAGS) $(XFLAGS) -c ../unix/ux_x11.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxagentc.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxcfg.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxcons.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxgen.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxmisc.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxnet.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxnoise.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxplink.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxprint.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxproxy.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxpterm.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxpty.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxputty.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxsel.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxser.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxsftp.c
uxsignal.o: ../unix/uxsignal.c
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../unix/uxsignal.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxstore.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) $(CFLAGS) $(XFLAGS) -c ../unix/uxucs.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) $(CFLAGS) $(XFLAGS) -c ../mac/vsnprint.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) $(CFLAGS) $(XFLAGS) -c ../wcwidth.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) $(CFLAGS) $(XFLAGS) -c ../wildcard.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) $(CFLAGS) $(XFLAGS) -c ../windows/wincfg.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) $(CFLAGS) $(XFLAGS) -c ../windows/wincons.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) $(CFLAGS) $(XFLAGS) -c ../windows/winctrls.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) $(CFLAGS) $(XFLAGS) -c ../windows/windefs.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) $(CFLAGS) $(XFLAGS) -c ../windows/windlg.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) $(CFLAGS) $(XFLAGS) -c ../windows/window.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) $(CFLAGS) $(XFLAGS) -c ../windows/winhandl.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) $(CFLAGS) $(XFLAGS) -c ../windows/winhelp.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) $(CFLAGS) $(XFLAGS) -c ../windows/winmisc.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) $(CFLAGS) $(XFLAGS) -c ../windows/winnet.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) $(CFLAGS) $(XFLAGS) -c ../windows/winnoise.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) $(CFLAGS) $(XFLAGS) -c ../windows/winpgen.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) $(CFLAGS) $(XFLAGS) -c ../windows/winpgnt.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) $(CFLAGS) $(XFLAGS) -c ../windows/winpgntc.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) $(CFLAGS) $(XFLAGS) -c ../windows/winplink.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) $(CFLAGS) $(XFLAGS) -c ../windows/winprint.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) $(CFLAGS) $(XFLAGS) -c ../windows/winproxy.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) $(CFLAGS) $(XFLAGS) -c ../windows/winser.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) $(CFLAGS) $(XFLAGS) -c ../windows/winsftp.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) $(CFLAGS) $(XFLAGS) -c ../windows/winstore.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) $(CFLAGS) $(XFLAGS) -c ../windows/wintime.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) $(CFLAGS) $(XFLAGS) -c ../windows/winucs.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) $(CFLAGS) $(XFLAGS) -c ../windows/winutils.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) $(CFLAGS) $(XFLAGS) -c ../x11fwd.c
xenc.o: ../charset/xenc.c ../charset/charset.h ../charset/internal.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../charset/xenc.c
xkeysym.o: ../unix/xkeysym.c ../misc.h ../puttymem.h
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../unix/xkeysym.c
xpmptcfg.o: ../unix/xpmptcfg.c
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../unix/xpmptcfg.c
xpmpterm.o: ../unix/xpmpterm.c
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../unix/xpmpterm.c
xpmpucfg.o: ../unix/xpmpucfg.c
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../unix/xpmpucfg.c
xpmputty.o: ../unix/xpmputty.c
$(CC) $(COMPAT) $(CFLAGS) $(XFLAGS) -c ../unix/xpmputty.c
version.o: FORCE
if test -z "$(VER)" && (cd ..; md5sum -c manifest); then \
$(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat ../version.def` -c ../version.c; \
else \
$(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c ../version.c; \
fi
install:
$(INSTALL_PROGRAM) -m 755 plink $(DESTDIR)$(bindir)/plink
$(INSTALL_PROGRAM) -m 755 pscp $(DESTDIR)$(bindir)/pscp
$(INSTALL_PROGRAM) -m 755 psftp $(DESTDIR)$(bindir)/psftp
$(INSTALL_PROGRAM) -m 755 pterm $(DESTDIR)$(bindir)/pterm
if test -n "$(UTMP_GROUP)"; then \
chgrp $(UTMP_GROUP) $(DESTDIR)$(bindir)/pterm && \
chmod 2755 $(DESTDIR)$(bindir)/pterm; \
elif test -n "$(UTMP_USER)"; then \
chown $(UTMP_USER) $(DESTDIR)$(bindir)/pterm && \
chmod 4755 $(DESTDIR)$(bindir)/pterm; \
fi
$(INSTALL_PROGRAM) -m 755 putty $(DESTDIR)$(bindir)/putty
$(INSTALL_PROGRAM) -m 755 puttygen $(DESTDIR)$(bindir)/puttygen
$(INSTALL_PROGRAM) -m 755 puttytel $(DESTDIR)$(bindir)/puttytel
$(INSTALL_DATA) -m 644 ../doc/plink.1 $(DESTDIR)$(man1dir)/plink.1
$(INSTALL_DATA) -m 644 ../doc/pscp.1 $(DESTDIR)$(man1dir)/pscp.1
$(INSTALL_DATA) -m 644 ../doc/psftp.1 $(DESTDIR)$(man1dir)/psftp.1
$(INSTALL_DATA) -m 644 ../doc/pterm.1 $(DESTDIR)$(man1dir)/pterm.1
$(INSTALL_DATA) -m 644 ../doc/putty.1 $(DESTDIR)$(man1dir)/putty.1
$(INSTALL_DATA) -m 644 ../doc/puttygen.1 $(DESTDIR)$(man1dir)/puttygen.1
$(INSTALL_DATA) -m 644 ../doc/puttytel.1 $(DESTDIR)$(man1dir)/puttytel.1
install-strip:
$(MAKE) install INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s"
clean:
rm -f *.o plink pscp psftp pterm putty puttygen puttytel
FORCE:

160
puttysrc/UNIX/UNIX.H Normal file
View File

@@ -0,0 +1,160 @@
#ifndef PUTTY_UNIX_H
#define PUTTY_UNIX_H
#ifdef HAVE_CONFIG_H
# include "uxconfig.h" /* Space to hide it from mkfiles.pl */
#endif
#include <stdio.h> /* for FILENAME_MAX */
#include "charset.h"
struct Filename {
char path[FILENAME_MAX];
};
FILE *f_open(struct Filename, char const *, int);
struct FontSpec {
char name[256];
};
typedef void *Context; /* FIXME: probably needs changing */
typedef int OSSocket;
#define OSSOCKET_DEFINED /* stop network.h using its default */
extern Backend pty_backend;
/*
* Under GTK, we send MA_CLICK _and_ MA_2CLK, or MA_CLICK _and_
* MA_3CLK, when a button is pressed for the second or third time.
*/
#define MULTICLICK_ONLY_EVENT 0
/*
* Under GTK, there is no context help available.
*/
#define HELPCTX(x) P(NULL)
#define FILTER_KEY_FILES NULL /* FIXME */
/*
* Under X, selection data must not be NUL-terminated.
*/
#define SELECTION_NUL_TERMINATED 0
/*
* Under X, copying to the clipboard terminates lines with just LF.
*/
#define SEL_NL { 10 }
/* Simple wraparound timer function */
unsigned long getticks(void); /* based on gettimeofday(2) */
#define GETTICKCOUNT getticks
#define TICKSPERSEC 1000 /* we choose to use milliseconds */
#define CURSORBLINK 450 /* no standard way to set this */
/* getticks() works using gettimeofday(), so it's vulnerable to system clock
* changes causing chaos. Therefore, we provide a compensation mechanism. */
#define TIMING_SYNC
#define TIMING_SYNC_ANOW
extern long tickcount_offset;
#define WCHAR wchar_t
#define BYTE unsigned char
/* Things pty.c needs from pterm.c */
char *get_x_display(void *frontend);
int font_dimension(void *frontend, int which);/* 0 for width, 1 for height */
long get_windowid(void *frontend);
/* Things gtkdlg.c needs from pterm.c */
void *get_window(void *frontend); /* void * to avoid depending on gtk.h */
/* Things pterm.c needs from gtkdlg.c */
int do_config_box(const char *title, Config *cfg,
int midsession, int protcfginfo);
void fatal_message_box(void *window, char *msg);
void about_box(void *window);
void *eventlogstuff_new(void);
void showeventlog(void *estuff, void *parentwin);
void logevent_dlg(void *estuff, const char *string);
int reallyclose(void *frontend);
/* Things pterm.c needs from {ptermm,uxputty}.c */
char *make_default_wintitle(char *hostname);
int process_nonoption_arg(char *arg, Config *cfg, int *allow_launch);
/* pterm.c needs this special function in xkeysym.c */
int keysym_to_unicode(int keysym);
/* Things uxstore.c needs from pterm.c */
char *x_get_default(const char *key);
/* Things uxstore.c provides to pterm.c */
void provide_xrm_string(char *string);
/* The interface used by uxsel.c */
void uxsel_init(void);
typedef int (*uxsel_callback_fn)(int fd, int event);
void uxsel_set(int fd, int rwx, uxsel_callback_fn callback);
void uxsel_del(int fd);
int select_result(int fd, int event);
int first_fd(int *state, int *rwx);
int next_fd(int *state, int *rwx);
/* The following are expected to be provided _to_ uxsel.c by the frontend */
int uxsel_input_add(int fd, int rwx); /* returns an id */
void uxsel_input_remove(int id);
/* uxcfg.c */
struct controlbox;
void unix_setup_config_box(struct controlbox *b, int midsession, int protocol);
/* gtkcfg.c */
void gtk_setup_config_box(struct controlbox *b, int midsession, void *window);
/*
* In the Unix Unicode layer, DEFAULT_CODEPAGE is a special value
* which causes mb_to_wc and wc_to_mb to call _libc_ rather than
* libcharset. That way, we can interface the various charsets
* supported by libcharset with the one supported by mbstowcs and
* wcstombs (which will be the character set in which stuff read
* from the command line or config files is assumed to be encoded).
*/
#define DEFAULT_CODEPAGE 0xFFFF
#define CP_UTF8 CS_UTF8 /* from libcharset */
#define strnicmp strncasecmp
#define stricmp strcasecmp
/* BSD-semantics version of signal(), and another helpful function */
void (*putty_signal(int sig, void (*func)(int)))(int);
void block_signal(int sig, int block_it);
/* uxmisc.c */
int cloexec(int);
/*
* Exports from unicode.c.
*/
struct unicode_data;
int init_ucs(struct unicode_data *ucsdata, char *line_codepage,
int utf8_override, int font_charset, int vtmode);
/*
* Spare function exported directly from uxnet.c.
*/
void *sk_getxdmdata(void *sock, int *lenp);
/*
* General helpful Unix stuff: more helpful version of the FD_SET
* macro, which also handles maxfd.
*/
#define FD_SET_MAX(fd, max, set) do { \
FD_SET(fd, &set); \
if (max < fd + 1) max = fd + 1; \
} while (0)
/*
* Exports from winser.c.
*/
extern Backend serial_backend;
#endif

162
puttysrc/UNIX/UXAGENTC.C Normal file
View File

@@ -0,0 +1,162 @@
/*
* SSH agent client code.
*/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <fcntl.h>
#include "putty.h"
#include "misc.h"
#include "tree234.h"
#include "puttymem.h"
int agent_exists(void)
{
if (getenv("SSH_AUTH_SOCK") != NULL)
return TRUE;
return FALSE;
}
static tree234 *agent_connections;
struct agent_connection {
int fd;
char *retbuf;
char sizebuf[4];
int retsize, retlen;
void (*callback)(void *, void *, int);
void *callback_ctx;
};
static int agent_conncmp(void *av, void *bv)
{
struct agent_connection *a = (struct agent_connection *) av;
struct agent_connection *b = (struct agent_connection *) bv;
if (a->fd < b->fd)
return -1;
if (a->fd > b->fd)
return +1;
return 0;
}
static int agent_connfind(void *av, void *bv)
{
int afd = *(int *) av;
struct agent_connection *b = (struct agent_connection *) bv;
if (afd < b->fd)
return -1;
if (afd > b->fd)
return +1;
return 0;
}
static int agent_select_result(int fd, int event)
{
int ret;
struct agent_connection *conn;
assert(event == 1); /* not selecting for anything but R */
conn = find234(agent_connections, &fd, agent_connfind);
if (!conn) {
uxsel_del(fd);
return 1;
}
ret = read(fd, conn->retbuf+conn->retlen, conn->retsize-conn->retlen);
if (ret <= 0) {
if (conn->retbuf != conn->sizebuf) sfree(conn->retbuf);
conn->retbuf = NULL;
conn->retlen = 0;
goto done;
}
conn->retlen += ret;
if (conn->retsize == 4 && conn->retlen == 4) {
conn->retsize = GET_32BIT(conn->retbuf);
if (conn->retsize <= 0) {
conn->retbuf = NULL;
conn->retlen = 0;
goto done;
}
conn->retsize += 4;
assert(conn->retbuf == conn->sizebuf);
conn->retbuf = snewn(conn->retsize, char);
memcpy(conn->retbuf, conn->sizebuf, 4);
}
if (conn->retlen < conn->retsize)
return 0; /* more data to come */
done:
/*
* We have now completed the agent query. Do the callback, and
* clean up. (Of course we don't free retbuf, since ownership
* of that passes to the callback.)
*/
conn->callback(conn->callback_ctx, conn->retbuf, conn->retlen);
uxsel_del(fd);
close(fd);
del234(agent_connections, conn);
sfree(conn);
return 0;
}
int agent_query(void *in, int inlen, void **out, int *outlen,
void (*callback)(void *, void *, int), void *callback_ctx)
{
char *name;
int sock;
struct sockaddr_un addr;
int done;
struct agent_connection *conn;
name = getenv("SSH_AUTH_SOCK");
if (!name)
goto failure;
sock = socket(PF_UNIX, SOCK_STREAM, 0);
if (sock < 0) {
perror("socket(PF_UNIX)");
exit(1);
}
cloexec(sock);
addr.sun_family = AF_UNIX;
strncpy(addr.sun_path, name, sizeof(addr.sun_path));
if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
close(sock);
goto failure;
}
for (done = 0; done < inlen ;) {
int ret = write(sock, (char *)in + done, inlen - done);
if (ret <= 0) {
close(sock);
goto failure;
}
done += ret;
}
if (!agent_connections)
agent_connections = newtree234(agent_conncmp);
conn = snew(struct agent_connection);
conn->fd = sock;
conn->retbuf = conn->sizebuf;
conn->retsize = 4;
conn->retlen = 0;
conn->callback = callback;
conn->callback_ctx = callback_ctx;
add234(agent_connections, conn);
uxsel_set(sock, 1, agent_select_result);
return 0;
failure:
*out = NULL;
*outlen = 0;
return 1;
}

80
puttysrc/UNIX/UXCFG.C Normal file
View File

@@ -0,0 +1,80 @@
/*
* uxcfg.c - the Unix-specific parts of the PuTTY configuration
* box.
*/
#include <assert.h>
#include <stdlib.h>
#include "putty.h"
#include "dialog.h"
#include "storage.h"
void unix_setup_config_box(struct controlbox *b, int midsession, int protocol)
{
struct controlset *s;
union control *c;
/*
* The Config structure contains two Unix-specific elements
* which are not configured in here: stamp_utmp and
* login_shell. This is because pterm does not put up a
* configuration box right at the start, which is the only time
* when these elements would be useful to configure.
*/
/*
* On Unix, we don't have a drop-down list for the printer
* control.
*/
s = ctrl_getset(b, "Terminal", "printing", "Remote-controlled printing");
assert(s->ncontrols == 1 && s->ctrls[0]->generic.type == CTRL_EDITBOX);
s->ctrls[0]->editbox.has_list = 0;
/*
* Unix supports a local-command proxy. This also means we must
* adjust the text on the `Telnet command' control.
*/
if (!midsession) {
int i;
s = ctrl_getset(b, "Connection/Proxy", "basics", NULL);
for (i = 0; i < s->ncontrols; i++) {
c = s->ctrls[i];
if (c->generic.type == CTRL_RADIO &&
c->generic.context.i == offsetof(Config, proxy_type)) {
assert(c->generic.handler == dlg_stdradiobutton_handler);
c->radio.nbuttons++;
c->radio.buttons =
sresize(c->radio.buttons, c->radio.nbuttons, char *);
c->radio.buttons[c->radio.nbuttons-1] =
dupstr("Local");
c->radio.buttondata =
sresize(c->radio.buttondata, c->radio.nbuttons, intorptr);
c->radio.buttondata[c->radio.nbuttons-1] = I(PROXY_CMD);
break;
}
}
for (i = 0; i < s->ncontrols; i++) {
c = s->ctrls[i];
if (c->generic.type == CTRL_EDITBOX &&
c->generic.context.i ==
offsetof(Config, proxy_telnet_command)) {
assert(c->generic.handler == dlg_stdeditbox_handler);
sfree(c->generic.label);
c->generic.label = dupstr("Telnet command, or local"
" proxy command");
break;
}
}
}
/*
* Serial back end is available on Unix. However, we have to
* mask out a couple of the configuration options: mark and
* space parity are not conveniently supported, and neither is
* DSR/DTR flow control.
*/
if (!midsession || (protocol == PROT_SERIAL))
ser_setup_config_box(b, midsession, 0x07, 0x07);
}

381
puttysrc/UNIX/UXCONS.C Normal file
View File

@@ -0,0 +1,381 @@
/*
* uxcons.c: various interactive-prompt routines shared between the
* Unix console PuTTY tools
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <assert.h>
#include <termios.h>
#include <unistd.h>
#include "putty.h"
#include "storage.h"
#include "ssh.h"
int console_batch_mode = FALSE;
static void *console_logctx = NULL;
/*
* Clean up and exit.
*/
void cleanup_exit(int code)
{
/*
* Clean up.
*/
sk_cleanup();
random_save_seed();
exit(code);
}
void set_busy_status(void *frontend, int status)
{
}
void update_specials_menu(void *frontend)
{
}
void notify_remote_exit(void *frontend)
{
}
void timer_change_notify(long next)
{
}
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)
{
int ret;
static const char absentmsg_batch[] =
"The server's host key is not cached. You have no guarantee\n"
"that the server is the computer you think it is.\n"
"The server's %s key fingerprint is:\n"
"%s\n"
"Connection abandoned.\n";
static const char absentmsg[] =
"The server's host key is not cached. You have no guarantee\n"
"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, enter \"y\" to add the key to\n"
"PuTTY's cache and carry on connecting.\n"
"If you want to carry on connecting just once, without\n"
"adding the key to the cache, enter \"n\".\n"
"If you do not trust this host, press Return to abandon the\n"
"connection.\n"
"Store key in cache? (y/n) ";
static const char wrongmsg_batch[] =
"WARNING - POTENTIAL SECURITY BREACH!\n"
"The server's host key does not match the one PuTTY has\n"
"cached. This means that either the server administrator\n"
"has changed the host key, or you have actually connected\n"
"to another computer pretending to be the server.\n"
"The new %s key fingerprint is:\n"
"%s\n"
"Connection abandoned.\n";
static const char wrongmsg[] =
"WARNING - POTENTIAL SECURITY BREACH!\n"
"The server's host key does not match the one PuTTY has\n"
"cached. This means that either the server administrator\n"
"has changed the host key, or you have actually connected\n"
"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,\n"
"enter \"y\" to update PuTTY's cache and continue connecting.\n"
"If you want to carry on connecting but without updating\n"
"the cache, enter \"n\".\n"
"If you want to abandon the connection completely, press\n"
"Return to cancel. Pressing Return is the ONLY guaranteed\n"
"safe choice.\n"
"Update cached key? (y/n, Return cancels connection) ";
static const char abandoned[] = "Connection abandoned.\n";
char line[32];
/*
* Verify the key.
*/
ret = verify_host_key(host, port, keytype, keystr);
if (ret == 0) /* success - key matched OK */
return 1;
if (ret == 2) { /* key was different */
if (console_batch_mode) {
fprintf(stderr, wrongmsg_batch, keytype, fingerprint);
return 0;
}
fprintf(stderr, wrongmsg, keytype, fingerprint);
fflush(stderr);
}
if (ret == 1) { /* key was absent */
if (console_batch_mode) {
fprintf(stderr, absentmsg_batch, keytype, fingerprint);
return 0;
}
fprintf(stderr, absentmsg, keytype, fingerprint);
fflush(stderr);
}
{
struct termios oldmode, newmode;
tcgetattr(0, &oldmode);
newmode = oldmode;
newmode.c_lflag |= ECHO | ISIG | ICANON;
tcsetattr(0, TCSANOW, &newmode);
line[0] = '\0';
read(0, line, sizeof(line) - 1);
tcsetattr(0, TCSANOW, &oldmode);
}
if (line[0] != '\0' && line[0] != '\r' && line[0] != '\n') {
if (line[0] == 'y' || line[0] == 'Y')
store_host_key(host, port, keytype, keystr);
return 1;
} else {
fprintf(stderr, abandoned);
return 0;
}
}
/*
* Ask whether the selected algorithm is acceptable (since it was
* below the configured 'warn' threshold).
*/
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\n"
"%s, which is below the configured warning threshold.\n"
"Continue with connection? (y/n) ";
static const char msg_batch[] =
"The first %s supported by the server is\n"
"%s, which is below the configured warning threshold.\n"
"Connection abandoned.\n";
static const char abandoned[] = "Connection abandoned.\n";
char line[32];
if (console_batch_mode) {
fprintf(stderr, msg_batch, algtype, algname);
return 0;
}
fprintf(stderr, msg, algtype, algname);
fflush(stderr);
{
struct termios oldmode, newmode;
tcgetattr(0, &oldmode);
newmode = oldmode;
newmode.c_lflag |= ECHO | ISIG | ICANON;
tcsetattr(0, TCSANOW, &newmode);
line[0] = '\0';
read(0, line, sizeof(line) - 1);
tcsetattr(0, TCSANOW, &oldmode);
}
if (line[0] == 'y' || line[0] == 'Y') {
return 1;
} else {
fprintf(stderr, abandoned);
return 0;
}
}
/*
* Ask whether to wipe a session log file before writing to it.
* Returns 2 for wipe, 1 for append, 0 for cancel (don't log).
*/
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.\n"
"You can overwrite it with a new session log,\n"
"append your session log to the end of it,\n"
"or disable session logging for this session.\n"
"Enter \"y\" to wipe the file, \"n\" to append to it,\n"
"or just press Return to disable logging.\n"
"Wipe the log file? (y/n, Return cancels logging) ";
static const char msgtemplate_batch[] =
"The session log file \"%.*s\" already exists.\n"
"Logging will not be enabled.\n";
char line[32];
if (console_batch_mode) {
fprintf(stderr, msgtemplate_batch, FILENAME_MAX, filename.path);
fflush(stderr);
return 0;
}
fprintf(stderr, msgtemplate, FILENAME_MAX, filename.path);
fflush(stderr);
{
struct termios oldmode, newmode;
tcgetattr(0, &oldmode);
newmode = oldmode;
newmode.c_lflag |= ECHO | ISIG | ICANON;
tcsetattr(0, TCSANOW, &newmode);
line[0] = '\0';
read(0, line, sizeof(line) - 1);
tcsetattr(0, TCSANOW, &oldmode);
}
if (line[0] == 'y' || line[0] == 'Y')
return 2;
else if (line[0] == 'n' || line[0] == 'N')
return 1;
else
return 0;
}
/*
* Warn about the obsolescent key file format.
*
* Uniquely among these functions, this one does _not_ expect a
* frontend handle. This means that if PuTTY is ported to a
* platform which requires frontend handles, this function will be
* an anomaly. Fortunately, the problem it addresses will not have
* been present on that platform, so it can plausibly be
* implemented as an empty function.
*/
void old_keyfile_warning(void)
{
static const char message[] =
"You are loading an SSH-2 private key which has an\n"
"old version of the file format. This means your key\n"
"file is not fully tamperproof. Future versions of\n"
"PuTTY may stop supporting this private key format,\n"
"so we recommend you convert your key to the new\n"
"format.\n"
"\n"
"Once the key is loaded into PuTTYgen, you can perform\n"
"this conversion simply by saving it again.\n";
fputs(message, stderr);
}
void console_provide_logctx(void *logctx)
{
console_logctx = logctx;
}
void logevent(void *frontend, const char *string)
{
if (console_logctx)
log_eventlog(console_logctx, string);
}
static void console_data_untrusted(const char *data, int len)
{
int i;
for (i = 0; i < len; i++)
if ((data[i] & 0x60) || (data[i] == '\n'))
fputc(data[i], stdout);
fflush(stdout);
}
int console_get_userpass_input(prompts_t *p, unsigned char *in, int inlen)
{
size_t curr_prompt;
/*
* Zero all the results, in case we abort half-way through.
*/
{
int i;
for (i = 0; i < p->n_prompts; i++)
memset(p->prompts[i]->result, 0, p->prompts[i]->result_len);
}
if (console_batch_mode)
return 0;
/*
* Preamble.
*/
/* We only print the `name' caption if we have to... */
if (p->name_reqd && p->name) {
size_t l = strlen(p->name);
console_data_untrusted(p->name, l);
if (p->name[l-1] != '\n')
console_data_untrusted("\n", 1);
}
/* ...but we always print any `instruction'. */
if (p->instruction) {
size_t l = strlen(p->instruction);
console_data_untrusted(p->instruction, l);
if (p->instruction[l-1] != '\n')
console_data_untrusted("\n", 1);
}
for (curr_prompt = 0; curr_prompt < p->n_prompts; curr_prompt++) {
struct termios oldmode, newmode;
int i;
prompt_t *pr = p->prompts[curr_prompt];
tcgetattr(0, &oldmode);
newmode = oldmode;
newmode.c_lflag |= ISIG | ICANON;
if (!pr->echo)
newmode.c_lflag &= ~ECHO;
else
newmode.c_lflag |= ECHO;
tcsetattr(0, TCSANOW, &newmode);
console_data_untrusted(pr->prompt, strlen(pr->prompt));
i = read(0, pr->result, pr->result_len - 1);
tcsetattr(0, TCSANOW, &oldmode);
if (i > 0 && pr->result[i-1] == '\n')
i--;
pr->result[i] = '\0';
if (!pr->echo)
fputs("\n", stdout);
}
return 1; /* success */
}
void frontend_keypress(void *handle)
{
/*
* This is nothing but a stub, in console code.
*/
return;
}
int is_interactive(void)
{
return isatty(0);
}
/*
* X11-forwarding-related things suitable for console.
*/
const char platform_x11_best_transport[] = "unix";
char *platform_get_x_display(void) {
return dupstr(getenv("DISPLAY"));
}

36
puttysrc/UNIX/UXGEN.C Normal file
View File

@@ -0,0 +1,36 @@
/*
* uxgen.c: Unix implementation of get_heavy_noise() from cmdgen.c.
*/
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include "putty.h"
char *get_random_data(int len)
{
char *buf = snewn(len, char);
int fd;
int ngot, ret;
fd = open("/dev/random", O_RDONLY);
if (fd < 0) {
sfree(buf);
perror("puttygen: unable to open /dev/random");
return NULL;
}
ngot = 0;
while (ngot < len) {
ret = read(fd, buf+ngot, len-ngot);
if (ret < 0) {
close(fd);
perror("puttygen: unable to read /dev/random");
return NULL;
}
ngot += ret;
}
return buf;
}

151
puttysrc/UNIX/UXMISC.C Normal file
View File

@@ -0,0 +1,151 @@
/*
* PuTTY miscellaneous Unix stuff
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/types.h>
#include <pwd.h>
#include "putty.h"
long tickcount_offset = 0;
unsigned long getticks(void)
{
struct timeval tv;
gettimeofday(&tv, NULL);
/*
* We want to use milliseconds rather than microseconds,
* because we need a decent number of them to fit into a 32-bit
* word so it can be used for keepalives.
*/
return tv.tv_sec * 1000 + tv.tv_usec / 1000 + tickcount_offset;
}
Filename filename_from_str(const char *str)
{
Filename ret;
strncpy(ret.path, str, sizeof(ret.path));
ret.path[sizeof(ret.path)-1] = '\0';
return ret;
}
const char *filename_to_str(const Filename *fn)
{
return fn->path;
}
int filename_equal(Filename f1, Filename f2)
{
return !strcmp(f1.path, f2.path);
}
int filename_is_null(Filename fn)
{
return !*fn.path;
}
#ifdef DEBUG
static FILE *debug_fp = NULL;
void dputs(char *buf)
{
if (!debug_fp) {
debug_fp = fopen("debug.log", "w");
}
write(1, buf, strlen(buf));
fputs(buf, debug_fp);
fflush(debug_fp);
}
#endif
char *get_username(void)
{
struct passwd *p;
uid_t uid = getuid();
char *user, *ret = NULL;
/*
* First, find who we think we are using getlogin. If this
* agrees with our uid, we'll go along with it. This should
* allow sharing of uids between several login names whilst
* coping correctly with people who have su'ed.
*/
user = getlogin();
setpwent();
if (user)
p = getpwnam(user);
else
p = NULL;
if (p && p->pw_uid == uid) {
/*
* The result of getlogin() really does correspond to
* our uid. Fine.
*/
ret = user;
} else {
/*
* If that didn't work, for whatever reason, we'll do
* the simpler version: look up our uid in the password
* file and map it straight to a name.
*/
p = getpwuid(uid);
if (!p)
return NULL;
ret = p->pw_name;
}
endpwent();
return dupstr(ret);
}
/*
* Display the fingerprints of the PGP Master Keys to the user.
* (This is here rather than in uxcons because it's appropriate even for
* Unix GUI apps.)
*/
void pgp_fingerprints(void)
{
fputs("These are the fingerprints of the PuTTY PGP Master Keys. They can\n"
"be used to establish a trust path from this executable to another\n"
"one. See the manual for more information.\n"
"(Note: these fingerprints have nothing to do with SSH!)\n"
"\n"
"PuTTY Master Key (RSA), 1024-bit:\n"
" " PGP_RSA_MASTER_KEY_FP "\n"
"PuTTY Master Key (DSA), 1024-bit:\n"
" " PGP_DSA_MASTER_KEY_FP "\n", stdout);
}
/*
* Set FD_CLOEXEC on a file descriptor
*/
int cloexec(int fd) {
int fdflags;
fdflags = fcntl(fd, F_GETFD);
if (fdflags == -1) return -1;
return fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC);
}
FILE *f_open(struct Filename filename, char const *mode, int is_private)
{
if (!is_private) {
return fopen(filename.path, mode);
} else {
int fd;
assert(mode[0] == 'w'); /* is_private is meaningless for read */
fd = open(filename.path, O_WRONLY | O_CREAT | O_TRUNC,
0700);
if (fd < 0)
return NULL;
return fdopen(fd, mode);
}
}

1295
puttysrc/UNIX/UXNET.C Normal file

File diff suppressed because it is too large Load Diff

127
puttysrc/UNIX/UXNOISE.C Normal file
View File

@@ -0,0 +1,127 @@
/*
* Noise generation for PuTTY's cryptographic random number
* generator.
*/
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/resource.h>
#include "putty.h"
#include "ssh.h"
#include "storage.h"
static int read_dev_urandom(char *buf, int len)
{
int fd;
int ngot, ret;
fd = open("/dev/urandom", O_RDONLY);
if (fd < 0)
return 0;
ngot = 0;
while (ngot < len) {
ret = read(fd, buf+ngot, len-ngot);
if (ret < 0) {
close(fd);
return 0;
}
ngot += ret;
}
return 1;
}
/*
* This function is called once, at PuTTY startup. It will do some
* slightly silly things such as fetching an entire process listing
* and scanning /tmp, load the saved random seed from disk, and
* also read 32 bytes out of /dev/urandom.
*/
void noise_get_heavy(void (*func) (void *, int))
{
char buf[512];
FILE *fp;
int ret;
if (read_dev_urandom(buf, 32))
func(buf, 32);
fp = popen("ps -axu 2>/dev/null", "r");
while ( (ret = fread(buf, 1, sizeof(buf), fp)) > 0)
func(buf, ret);
pclose(fp);
fp = popen("ls -al /tmp 2>/dev/null", "r");
while ( (ret = fread(buf, 1, sizeof(buf), fp)) > 0)
func(buf, ret);
pclose(fp);
read_random_seed(func);
random_save_seed();
}
void random_save_seed(void)
{
int len;
void *data;
if (random_active) {
random_get_savedata(&data, &len);
write_random_seed(data, len);
sfree(data);
}
}
/*
* This function is called every time the random pool needs
* stirring, and will acquire the system time.
*/
void noise_get_light(void (*func) (void *, int))
{
struct timeval tv;
gettimeofday(&tv, NULL);
func(&tv, sizeof(tv));
}
/*
* This function is called on a timer, and grabs as much changeable
* system data as it can quickly get its hands on.
*/
void noise_regular(void)
{
int fd;
int ret;
char buf[512];
struct rusage rusage;
if ((fd = open("/proc/meminfo", O_RDONLY)) >= 0) {
while ( (ret = read(fd, buf, sizeof(buf))) > 0)
random_add_noise(buf, ret);
close(fd);
}
if ((fd = open("/proc/stat", O_RDONLY)) >= 0) {
while ( (ret = read(fd, buf, sizeof(buf))) > 0)
random_add_noise(buf, ret);
close(fd);
}
getrusage(RUSAGE_SELF, &rusage);
random_add_noise(&rusage, sizeof(rusage));
}
/*
* This function is called on every keypress or mouse move, and
* will add the current time to the noise pool. It gets the scan
* code or mouse position passed in, and adds that too.
*/
void noise_ultralight(unsigned long data)
{
struct timeval tv;
gettimeofday(&tv, NULL);
random_add_noise(&tv, sizeof(tv));
random_add_noise(&data, sizeof(data));
}

1072
puttysrc/UNIX/UXPLINK.C Normal file

File diff suppressed because it is too large Load Diff

57
puttysrc/UNIX/UXPRINT.C Normal file
View File

@@ -0,0 +1,57 @@
/*
* Printing interface for PuTTY.
*/
#include <assert.h>
#include <stdio.h>
#include "putty.h"
struct printer_job_tag {
FILE *fp;
};
printer_job *printer_start_job(char *printer)
{
printer_job *ret = snew(printer_job);
/*
* On Unix, we treat the printer string as the name of a
* command to pipe to - typically lpr, of course.
*/
ret->fp = popen(printer, "w");
if (!ret->fp) {
sfree(ret);
ret = NULL;
}
return ret;
}
void printer_job_data(printer_job *pj, void *data, int len)
{
if (!pj)
return;
fwrite(data, 1, len, pj->fp);
}
void printer_finish_job(printer_job *pj)
{
if (!pj)
return;
pclose(pj->fp);
sfree(pj);
}
/*
* There's no sensible way to enumerate printers under Unix, since
* practically any valid Unix command is a valid printer :-) So
* these are useless stub functions, and uxcfg.c will disable the
* drop-down list in the printer configurer.
*/
printer_enum *printer_start_enum(int *nprinters_ptr) {
*nprinters_ptr = 0;
return NULL;
}
char *printer_get_name(printer_enum *pe, int i) { return NULL;
}
void printer_finish_enum(printer_enum *pe) { }

309
puttysrc/UNIX/UXPROXY.C Normal file
View File

@@ -0,0 +1,309 @@
/*
* uxproxy.c: Unix implementation of platform_new_connection(),
* supporting an OpenSSH-like proxy command.
*/
#include <stdio.h>
#include <assert.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#define DEFINE_PLUG_METHOD_MACROS
#include "tree234.h"
#include "putty.h"
#include "network.h"
#include "proxy.h"
typedef struct Socket_localproxy_tag * Local_Proxy_Socket;
struct Socket_localproxy_tag {
const struct socket_function_table *fn;
/* the above variable absolutely *must* be the first in this structure */
int to_cmd, from_cmd; /* fds */
char *error;
Plug plug;
bufchain pending_output_data;
bufchain pending_input_data;
void *privptr;
};
static int localproxy_select_result(int fd, int event);
/*
* Trees to look up the pipe fds in.
*/
static tree234 *localproxy_by_fromfd, *localproxy_by_tofd;
static int localproxy_fromfd_cmp(void *av, void *bv)
{
Local_Proxy_Socket a = (Local_Proxy_Socket)av;
Local_Proxy_Socket b = (Local_Proxy_Socket)bv;
if (a->from_cmd < b->from_cmd)
return -1;
if (a->from_cmd > b->from_cmd)
return +1;
return 0;
}
static int localproxy_fromfd_find(void *av, void *bv)
{
int a = *(int *)av;
Local_Proxy_Socket b = (Local_Proxy_Socket)bv;
if (a < b->from_cmd)
return -1;
if (a > b->from_cmd)
return +1;
return 0;
}
static int localproxy_tofd_cmp(void *av, void *bv)
{
Local_Proxy_Socket a = (Local_Proxy_Socket)av;
Local_Proxy_Socket b = (Local_Proxy_Socket)bv;
if (a->to_cmd < b->to_cmd)
return -1;
if (a->to_cmd > b->to_cmd)
return +1;
return 0;
}
static int localproxy_tofd_find(void *av, void *bv)
{
int a = *(int *)av;
Local_Proxy_Socket b = (Local_Proxy_Socket)bv;
if (a < b->to_cmd)
return -1;
if (a > b->to_cmd)
return +1;
return 0;
}
/* basic proxy socket functions */
static Plug sk_localproxy_plug (Socket s, Plug p)
{
Local_Proxy_Socket ps = (Local_Proxy_Socket) s;
Plug ret = ps->plug;
if (p)
ps->plug = p;
return ret;
}
static void sk_localproxy_close (Socket s)
{
Local_Proxy_Socket ps = (Local_Proxy_Socket) s;
del234(localproxy_by_fromfd, ps);
del234(localproxy_by_tofd, ps);
uxsel_del(ps->to_cmd);
uxsel_del(ps->from_cmd);
close(ps->to_cmd);
close(ps->from_cmd);
sfree(ps);
}
static int localproxy_try_send(Local_Proxy_Socket ps)
{
int sent = 0;
while (bufchain_size(&ps->pending_output_data) > 0) {
void *data;
int len, ret;
bufchain_prefix(&ps->pending_output_data, &data, &len);
ret = write(ps->to_cmd, data, len);
if (ret < 0 && errno != EWOULDBLOCK) {
/* We're inside the Unix frontend here, so we know
* that the frontend handle is unnecessary. */
logevent(NULL, strerror(errno));
fatalbox("%s", strerror(errno));
} else if (ret <= 0) {
break;
} else {
bufchain_consume(&ps->pending_output_data, ret);
sent += ret;
}
}
if (bufchain_size(&ps->pending_output_data) == 0)
uxsel_del(ps->to_cmd);
else
uxsel_set(ps->to_cmd, 2, localproxy_select_result);
return sent;
}
static int sk_localproxy_write (Socket s, const char *data, int len)
{
Local_Proxy_Socket ps = (Local_Proxy_Socket) s;
bufchain_add(&ps->pending_output_data, data, len);
localproxy_try_send(ps);
return bufchain_size(&ps->pending_output_data);
}
static int sk_localproxy_write_oob (Socket s, const char *data, int len)
{
/*
* oob data is treated as inband; nasty, but nothing really
* better we can do
*/
return sk_localproxy_write(s, data, len);
}
static void sk_localproxy_flush (Socket s)
{
/* Local_Proxy_Socket ps = (Local_Proxy_Socket) s; */
/* do nothing */
}
static void sk_localproxy_set_private_ptr (Socket s, void *ptr)
{
Local_Proxy_Socket ps = (Local_Proxy_Socket) s;
ps->privptr = ptr;
}
static void * sk_localproxy_get_private_ptr (Socket s)
{
Local_Proxy_Socket ps = (Local_Proxy_Socket) s;
return ps->privptr;
}
static void sk_localproxy_set_frozen (Socket s, int is_frozen)
{
Local_Proxy_Socket ps = (Local_Proxy_Socket) s;
if (is_frozen)
uxsel_del(ps->from_cmd);
else
uxsel_set(ps->from_cmd, 1, localproxy_select_result);
}
static const char * sk_localproxy_socket_error (Socket s)
{
Local_Proxy_Socket ps = (Local_Proxy_Socket) s;
return ps->error;
}
static int localproxy_select_result(int fd, int event)
{
Local_Proxy_Socket s;
char buf[20480];
int ret;
if (!(s = find234(localproxy_by_fromfd, &fd, localproxy_fromfd_find)) &&
!(s = find234(localproxy_by_tofd, &fd, localproxy_tofd_find)) )
return 1; /* boggle */
if (event == 1) {
assert(fd == s->from_cmd);
ret = read(fd, buf, sizeof(buf));
if (ret < 0) {
return plug_closing(s->plug, strerror(errno), errno, 0);
} else if (ret == 0) {
return plug_closing(s->plug, NULL, 0, 0);
} else {
return plug_receive(s->plug, 1, buf, ret);
}
} else if (event == 2) {
assert(fd == s->to_cmd);
if (localproxy_try_send(s))
plug_sent(s->plug, bufchain_size(&s->pending_output_data));
return 1;
}
return 1;
}
Socket platform_new_connection(SockAddr addr, char *hostname,
int port, int privport,
int oobinline, int nodelay, int keepalive,
Plug plug, const Config *cfg)
{
char *cmd;
static const struct socket_function_table socket_fn_table = {
sk_localproxy_plug,
sk_localproxy_close,
sk_localproxy_write,
sk_localproxy_write_oob,
sk_localproxy_flush,
sk_localproxy_set_private_ptr,
sk_localproxy_get_private_ptr,
sk_localproxy_set_frozen,
sk_localproxy_socket_error
};
Local_Proxy_Socket ret;
int to_cmd_pipe[2], from_cmd_pipe[2], pid;
if (cfg->proxy_type != PROXY_CMD)
return NULL;
cmd = format_telnet_command(addr, port, cfg);
ret = snew(struct Socket_localproxy_tag);
ret->fn = &socket_fn_table;
ret->plug = plug;
ret->error = NULL;
bufchain_init(&ret->pending_input_data);
bufchain_init(&ret->pending_output_data);
/*
* Create the pipes to the proxy command, and spawn the proxy
* command process.
*/
if (pipe(to_cmd_pipe) < 0 ||
pipe(from_cmd_pipe) < 0) {
ret->error = dupprintf("pipe: %s", strerror(errno));
return (Socket)ret;
}
cloexec(to_cmd_pipe[1]);
cloexec(from_cmd_pipe[0]);
pid = fork();
if (pid < 0) {
ret->error = dupprintf("fork: %s", strerror(errno));
return (Socket)ret;
} else if (pid == 0) {
close(0);
close(1);
dup2(to_cmd_pipe[0], 0);
dup2(from_cmd_pipe[1], 1);
close(to_cmd_pipe[0]);
close(from_cmd_pipe[1]);
fcntl(0, F_SETFD, 0);
fcntl(1, F_SETFD, 0);
execl("/bin/sh", "sh", "-c", cmd, (void *)NULL);
_exit(255);
}
close(to_cmd_pipe[0]);
close(from_cmd_pipe[1]);
ret->to_cmd = to_cmd_pipe[1];
ret->from_cmd = from_cmd_pipe[0];
if (!localproxy_by_fromfd)
localproxy_by_fromfd = newtree234(localproxy_fromfd_cmp);
if (!localproxy_by_tofd)
localproxy_by_tofd = newtree234(localproxy_tofd_cmp);
add234(localproxy_by_fromfd, ret);
add234(localproxy_by_tofd, ret);
uxsel_set(ret->from_cmd, 1, localproxy_select_result);
/* We are responsible for this and don't need it any more */
sk_addr_free(addr);
return (Socket) ret;
}

57
puttysrc/UNIX/UXPTERM.C Normal file
View File

@@ -0,0 +1,57 @@
/*
* pterm main program.
*/
#include <stdio.h>
#include <stdlib.h>
#include "putty.h"
const char *const appname = "pterm";
const int use_event_log = 0; /* pterm doesn't need it */
const int new_session = 0, saved_sessions = 0; /* or these */
const int use_pty_argv = TRUE;
Backend *select_backend(Config *cfg)
{
return &pty_backend;
}
int cfgbox(Config *cfg)
{
/*
* This is a no-op in pterm, except that we'll ensure the
* protocol is set to -1 to inhibit the useless Connection
* panel in the config box.
*/
cfg->protocol = -1;
return 1;
}
void cleanup_exit(int code)
{
exit(code);
}
int process_nonoption_arg(char *arg, Config *cfg, int *allow_launch)
{
return 0; /* pterm doesn't have any. */
}
char *make_default_wintitle(char *hostname)
{
return dupstr("pterm");
}
int main(int argc, char **argv)
{
extern int pt_main(int argc, char **argv);
extern void pty_pre_init(void); /* declared in pty.c */
cmdline_tooltype = TOOLTYPE_NONNETWORK;
default_protocol = -1;
pty_pre_init();
return pt_main(argc, argv);
}

1089
puttysrc/UNIX/UXPTY.C Normal file

File diff suppressed because it is too large Load Diff

149
puttysrc/UNIX/UXPUTTY.C Normal file
View File

@@ -0,0 +1,149 @@
/*
* Unix PuTTY main program.
*/
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <assert.h>
#include <unistd.h>
#include <gdk/gdk.h>
#include "putty.h"
#include "storage.h"
/*
* Stubs to avoid uxpty.c needing to be linked in.
*/
const int use_pty_argv = FALSE;
char **pty_argv; /* never used */
/*
* Clean up and exit.
*/
void cleanup_exit(int code)
{
/*
* Clean up.
*/
sk_cleanup();
random_save_seed();
exit(code);
}
Backend *select_backend(Config *cfg)
{
int i;
Backend *back = NULL;
for (i = 0; backends[i].backend != NULL; i++)
if (backends[i].protocol == cfg->protocol) {
back = backends[i].backend;
break;
}
assert(back != NULL);
return back;
}
int cfgbox(Config *cfg)
{
return do_config_box("PuTTY Configuration", cfg, 0, 0);
}
static int got_host = 0;
const int use_event_log = 1, new_session = 1, saved_sessions = 1;
int process_nonoption_arg(char *arg, Config *cfg, int *allow_launch)
{
char *p, *q = arg;
if (got_host) {
/*
* If we already have a host name, treat this argument as a
* port number. NB we have to treat this as a saved -P
* argument, so that it will be deferred until it's a good
* moment to run it.
*/
int ret = cmdline_process_param("-P", arg, 1, cfg);
assert(ret == 2);
} else if (!strncmp(q, "telnet:", 7)) {
/*
* If the hostname starts with "telnet:",
* set the protocol to Telnet and process
* the string as a Telnet URL.
*/
char c;
q += 7;
if (q[0] == '/' && q[1] == '/')
q += 2;
cfg->protocol = PROT_TELNET;
p = q;
while (*p && *p != ':' && *p != '/')
p++;
c = *p;
if (*p)
*p++ = '\0';
if (c == ':')
cfg->port = atoi(p);
else
cfg->port = -1;
strncpy(cfg->host, q, sizeof(cfg->host) - 1);
cfg->host[sizeof(cfg->host) - 1] = '\0';
got_host = 1;
} else {
/*
* Otherwise, treat this argument as a host name.
*/
p = arg;
while (*p && !isspace((unsigned char)*p))
p++;
if (*p)
*p++ = '\0';
strncpy(cfg->host, q, sizeof(cfg->host) - 1);
cfg->host[sizeof(cfg->host) - 1] = '\0';
got_host = 1;
}
if (got_host)
*allow_launch = TRUE;
return 1;
}
char *make_default_wintitle(char *hostname)
{
return dupcat(hostname, " - PuTTY", NULL);
}
/*
* X11-forwarding-related things suitable for Gtk app.
*/
const char platform_x11_best_transport[] = "unix";
char *platform_get_x_display(void) {
const char *display;
/* Try to take account of --display and what have you. */
if (!(display = gdk_get_display()))
/* fall back to traditional method */
display = getenv("DISPLAY");
return dupstr(display);
}
int main(int argc, char **argv)
{
extern int pt_main(int argc, char **argv);
sk_init();
flags = FLAG_VERBOSE | FLAG_INTERACTIVE;
default_protocol = be_default_protocol;
/* Find the appropriate default port. */
{
int i;
default_port = 0; /* illegal */
for (i = 0; backends[i].backend != NULL; i++)
if (backends[i].protocol == default_protocol) {
default_port = backends[i].backend->default_port;
break;
}
}
return pt_main(argc, argv);
}

127
puttysrc/UNIX/UXSEL.C Normal file
View File

@@ -0,0 +1,127 @@
/*
* uxsel.c
*
* This module is a sort of all-purpose interchange for file
* descriptors. At one end it talks to uxnet.c and pty.c and
* anything else which might have one or more fds that need
* select()-type things doing to them during an extended program
* run; at the other end it talks to pterm.c or uxplink.c or
* anything else which might have its own means of actually doing
* those select()-type things.
*/
#include <assert.h>
#include "putty.h"
#include "tree234.h"
struct fd {
int fd;
int rwx; /* 4=except 2=write 1=read */
uxsel_callback_fn callback;
int id; /* for uxsel_input_remove */
};
static tree234 *fds;
static int uxsel_fd_cmp(void *av, void *bv)
{
struct fd *a = (struct fd *)av;
struct fd *b = (struct fd *)bv;
if (a->fd < b->fd)
return -1;
if (a->fd > b->fd)
return +1;
return 0;
}
static int uxsel_fd_findcmp(void *av, void *bv)
{
int *a = (int *)av;
struct fd *b = (struct fd *)bv;
if (*a < b->fd)
return -1;
if (*a > b->fd)
return +1;
return 0;
}
void uxsel_init(void)
{
fds = newtree234(uxsel_fd_cmp);
}
/*
* Here is the interface to fd-supplying modules. They supply an
* fd, a set of read/write/execute states, and a callback function
* for when the fd satisfies one of those states. Repeated calls to
* uxsel_set on the same fd are perfectly legal and serve to change
* the rwx state (typically you only want to select an fd for
* writing when you actually have pending data you want to write to
* it!).
*/
void uxsel_set(int fd, int rwx, uxsel_callback_fn callback)
{
struct fd *newfd = snew(struct fd);
struct fd *oldfd;
newfd->fd = fd;
newfd->rwx = rwx;
newfd->callback = callback;
oldfd = find234(fds, newfd, NULL);
if (oldfd) {
uxsel_input_remove(oldfd->id);
del234(fds, oldfd);
sfree(oldfd);
}
add234(fds, newfd);
newfd->id = uxsel_input_add(fd, rwx);
}
void uxsel_del(int fd)
{
struct fd *oldfd = find234(fds, &fd, uxsel_fd_findcmp);
if (oldfd) {
uxsel_input_remove(oldfd->id);
del234(fds, oldfd);
sfree(oldfd);
}
}
/*
* And here is the interface to select-functionality-supplying
* modules.
*/
int next_fd(int *state, int *rwx)
{
struct fd *fd;
fd = index234(fds, (*state)++);
if (fd) {
*rwx = fd->rwx;
return fd->fd;
} else
return -1;
}
int first_fd(int *state, int *rwx)
{
*state = 0;
return next_fd(state, rwx);
}
int select_result(int fd, int event)
{
struct fd *fdstruct = find234(fds, &fd, uxsel_fd_findcmp);
/*
* Apparently this can sometimes be NULL. Can't see how, but I
* assume it means I need to ignore the event since it's on an
* fd I've stopped being interested in. Sigh.
*/
if (fdstruct)
return fdstruct->callback(fd, event);
else
return 1;
}

540
puttysrc/UNIX/UXSER.C Normal file
View File

@@ -0,0 +1,540 @@
/*
* Serial back end (Unix-specific).
*/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <termios.h>
#include "putty.h"
#include "tree234.h"
#define SERIAL_MAX_BACKLOG 4096
typedef struct serial_backend_data {
void *frontend;
int fd;
int finished;
int inbufsize;
bufchain output_data;
} *Serial;
/*
* We store our serial backends in a tree sorted by fd, so that
* when we get an uxsel notification we know which backend instance
* is the owner of the serial port that caused it.
*/
static int serial_compare_by_fd(void *av, void *bv)
{
Serial a = (Serial)av;
Serial b = (Serial)bv;
if (a->fd < b->fd)
return -1;
else if (a->fd > b->fd)
return +1;
return 0;
}
static int serial_find_by_fd(void *av, void *bv)
{
int a = *(int *)av;
Serial b = (Serial)bv;
if (a < b->fd)
return -1;
else if (a > b->fd)
return +1;
return 0;
}
static tree234 *serial_by_fd = NULL;
static int serial_select_result(int fd, int event);
static void serial_uxsel_setup(Serial serial);
static void serial_try_write(Serial serial);
static const char *serial_configure(Serial serial, Config *cfg)
{
struct termios options;
int bflag, bval;
const char *str;
char *msg;
if (serial->fd < 0)
return "Unable to reconfigure already-closed serial connection";
tcgetattr(serial->fd, &options);
/*
* Find the appropriate baud rate flag.
*/
#define SETBAUD(x) (bflag = B ## x, bval = x)
#define CHECKBAUD(x) do { if (cfg->serspeed >= x) SETBAUD(x); } while (0)
SETBAUD(50);
#ifdef B75
CHECKBAUD(75);
#endif
#ifdef B110
CHECKBAUD(110);
#endif
#ifdef B134
CHECKBAUD(134);
#endif
#ifdef B150
CHECKBAUD(150);
#endif
#ifdef B200
CHECKBAUD(200);
#endif
#ifdef B300
CHECKBAUD(300);
#endif
#ifdef B600
CHECKBAUD(600);
#endif
#ifdef B1200
CHECKBAUD(1200);
#endif
#ifdef B1800
CHECKBAUD(1800);
#endif
#ifdef B2400
CHECKBAUD(2400);
#endif
#ifdef B4800
CHECKBAUD(4800);
#endif
#ifdef B9600
CHECKBAUD(9600);
#endif
#ifdef B19200
CHECKBAUD(19200);
#endif
#ifdef B38400
CHECKBAUD(38400);
#endif
#ifdef B57600
CHECKBAUD(57600);
#endif
#ifdef B76800
CHECKBAUD(76800);
#endif
#ifdef B115200
CHECKBAUD(115200);
#endif
#ifdef B230400
CHECKBAUD(230400);
#endif
#undef CHECKBAUD
#undef SETBAUD
cfsetispeed(&options, bflag);
cfsetospeed(&options, bflag);
msg = dupprintf("Configuring baud rate %d", bval);
logevent(serial->frontend, msg);
sfree(msg);
options.c_cflag &= ~CSIZE;
switch (cfg->serdatabits) {
case 5: options.c_cflag |= CS5; break;
case 6: options.c_cflag |= CS6; break;
case 7: options.c_cflag |= CS7; break;
case 8: options.c_cflag |= CS8; break;
default: return "Invalid number of data bits (need 5, 6, 7 or 8)";
}
msg = dupprintf("Configuring %d data bits", cfg->serdatabits);
logevent(serial->frontend, msg);
sfree(msg);
if (cfg->serstopbits >= 4) {
options.c_cflag |= CSTOPB;
} else {
options.c_cflag &= ~CSTOPB;
}
msg = dupprintf("Configuring %d stop bits",
(options.c_cflag & CSTOPB ? 2 : 1));
logevent(serial->frontend, msg);
sfree(msg);
options.c_iflag &= ~(IXON|IXOFF);
#ifdef CRTSCTS
options.c_cflag &= ~CRTSCTS;
#endif
#ifdef CNEW_RTSCTS
options.c_cflag &= ~CNEW_RTSCTS;
#endif
if (cfg->serflow == SER_FLOW_XONXOFF) {
options.c_iflag |= IXON | IXOFF;
str = "XON/XOFF";
} else if (cfg->serflow == SER_FLOW_RTSCTS) {
#ifdef CRTSCTS
options.c_cflag |= CRTSCTS;
#endif
#ifdef CNEW_RTSCTS
options.c_cflag |= CNEW_RTSCTS;
#endif
str = "RTS/CTS";
} else
str = "no";
msg = dupprintf("Configuring %s flow control", str);
logevent(serial->frontend, msg);
sfree(msg);
/* Parity */
if (cfg->serparity == SER_PAR_ODD) {
options.c_cflag |= PARENB;
options.c_cflag |= PARODD;
str = "odd";
} else if (cfg->serparity == SER_PAR_EVEN) {
options.c_cflag |= PARENB;
options.c_cflag &= ~PARODD;
str = "even";
} else {
options.c_cflag &= ~PARENB;
str = "no";
}
msg = dupprintf("Configuring %s parity", str);
logevent(serial->frontend, msg);
sfree(msg);
options.c_cflag |= CLOCAL | CREAD;
options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
options.c_iflag &= ~(ISTRIP | IGNCR | INLCR | ICRNL
#ifdef IUCLC
| IUCLC
#endif
);
options.c_oflag &= ~(OPOST
#ifdef ONLCR
| ONLCR
#endif
#ifdef OCRNL
| OCRNL
#endif
#ifdef ONOCR
| ONOCR
#endif
#ifdef ONLRET
| ONLRET
#endif
);
options.c_cc[VMIN] = 1;
options.c_cc[VTIME] = 0;
if (tcsetattr(serial->fd, TCSANOW, &options) < 0)
return "Unable to configure serial port";
return NULL;
}
/*
* Called to set up the serial connection.
*
* Returns an error message, or NULL on success.
*
* Also places the canonical host name into `realhost'. It must be
* freed by the caller.
*/
static const char *serial_init(void *frontend_handle, void **backend_handle,
Config *cfg,
char *host, int port, char **realhost, int nodelay,
int keepalive)
{
Serial serial;
const char *err;
serial = snew(struct serial_backend_data);
*backend_handle = serial;
serial->frontend = frontend_handle;
serial->finished = FALSE;
serial->inbufsize = 0;
bufchain_init(&serial->output_data);
{
char *msg = dupprintf("Opening serial device %s", cfg->serline);
logevent(serial->frontend, msg);
}
serial->fd = open(cfg->serline, O_RDWR | O_NOCTTY | O_NDELAY | O_NONBLOCK);
if (serial->fd < 0)
return "Unable to open serial port";
cloexec(serial->fd);
err = serial_configure(serial, cfg);
if (err)
return err;
*realhost = dupstr(cfg->serline);
if (!serial_by_fd)
serial_by_fd = newtree234(serial_compare_by_fd);
add234(serial_by_fd, serial);
serial_uxsel_setup(serial);
/*
* Specials are always available.
*/
update_specials_menu(serial->frontend);
return NULL;
}
static void serial_close(Serial serial)
{
if (serial->fd >= 0) {
close(serial->fd);
serial->fd = -1;
}
}
static void serial_free(void *handle)
{
Serial serial = (Serial) handle;
serial_close(serial);
bufchain_clear(&serial->output_data);
sfree(serial);
}
static void serial_reconfig(void *handle, Config *cfg)
{
Serial serial = (Serial) handle;
const char *err;
err = serial_configure(serial, cfg);
/*
* FIXME: what should we do if err returns something?
*/
}
static int serial_select_result(int fd, int event)
{
Serial serial;
char buf[4096];
int ret;
int finished = FALSE;
serial = find234(serial_by_fd, &fd, serial_find_by_fd);
if (!serial)
return 1; /* spurious event; keep going */
if (event == 1) {
ret = read(serial->fd, buf, sizeof(buf));
if (ret == 0) {
/*
* Shouldn't happen on a real serial port, but I'm open
* to the idea that there might be two-way devices we
* can treat _like_ serial ports which can return EOF.
*/
finished = TRUE;
} else if (ret < 0) {
perror("read serial port");
exit(1);
} else if (ret > 0) {
serial->inbufsize = from_backend(serial->frontend, 0, buf, ret);
serial_uxsel_setup(serial); /* might acquire backlog and freeze */
}
} else if (event == 2) {
/*
* Attempt to send data down the pty.
*/
serial_try_write(serial);
}
if (finished) {
serial_close(serial);
serial->finished = TRUE;
notify_remote_exit(serial->frontend);
}
return !finished;
}
static void serial_uxsel_setup(Serial serial)
{
int rwx = 0;
if (serial->inbufsize <= SERIAL_MAX_BACKLOG)
rwx |= 1;
if (bufchain_size(&serial->output_data))
rwx |= 2; /* might also want to write to it */
uxsel_set(serial->fd, rwx, serial_select_result);
}
static void serial_try_write(Serial serial)
{
void *data;
int len, ret;
assert(serial->fd >= 0);
while (bufchain_size(&serial->output_data) > 0) {
bufchain_prefix(&serial->output_data, &data, &len);
ret = write(serial->fd, data, len);
if (ret < 0 && (errno == EWOULDBLOCK)) {
/*
* We've sent all we can for the moment.
*/
break;
}
if (ret < 0) {
perror("write serial port");
exit(1);
}
bufchain_consume(&serial->output_data, ret);
}
serial_uxsel_setup(serial);
}
/*
* Called to send data down the serial connection.
*/
static int serial_send(void *handle, char *buf, int len)
{
Serial serial = (Serial) handle;
if (serial->fd < 0)
return 0;
bufchain_add(&serial->output_data, buf, len);
serial_try_write(serial);
return bufchain_size(&serial->output_data);
}
/*
* Called to query the current sendability status.
*/
static int serial_sendbuffer(void *handle)
{
Serial serial = (Serial) handle;
return bufchain_size(&serial->output_data);
}
/*
* Called to set the size of the window
*/
static void serial_size(void *handle, int width, int height)
{
/* Do nothing! */
return;
}
/*
* Send serial special codes.
*/
static void serial_special(void *handle, Telnet_Special code)
{
Serial serial = (Serial) handle;
if (serial->fd >= 0 && code == TS_BRK) {
tcsendbreak(serial->fd, 0);
logevent(serial->frontend, "Sending serial break at user request");
}
return;
}
/*
* Return a list of the special codes that make sense in this
* protocol.
*/
static const struct telnet_special *serial_get_specials(void *handle)
{
static const struct telnet_special specials[] = {
{"Break", TS_BRK},
{NULL, TS_EXITMENU}
};
return specials;
}
static int serial_connected(void *handle)
{
return 1; /* always connected */
}
static int serial_sendok(void *handle)
{
return 1;
}
static void serial_unthrottle(void *handle, int backlog)
{
Serial serial = (Serial) handle;
serial->inbufsize = backlog;
serial_uxsel_setup(serial);
}
static int serial_ldisc(void *handle, int option)
{
/*
* Local editing and local echo are off by default.
*/
return 0;
}
static void serial_provide_ldisc(void *handle, void *ldisc)
{
/* This is a stub. */
}
static void serial_provide_logctx(void *handle, void *logctx)
{
/* This is a stub. */
}
static int serial_exitcode(void *handle)
{
Serial serial = (Serial) handle;
if (serial->fd >= 0)
return -1; /* still connected */
else
/* Exit codes are a meaningless concept with serial ports */
return INT_MAX;
}
/*
* cfg_info for Serial does nothing at all.
*/
static int serial_cfg_info(void *handle)
{
return 0;
}
Backend serial_backend = {
serial_init,
serial_free,
serial_reconfig,
serial_send,
serial_sendbuffer,
serial_size,
serial_special,
serial_get_specials,
serial_connected,
serial_exitcode,
serial_sendok,
serial_ldisc,
serial_provide_ldisc,
serial_provide_logctx,
serial_unthrottle,
serial_cfg_info,
1
};

613
puttysrc/UNIX/UXSFTP.C Normal file
View File

@@ -0,0 +1,613 @@
/*
* uxsftp.c: the Unix-specific parts of PSFTP and PSCP.
*/
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <fcntl.h>
#include <dirent.h>
#include <unistd.h>
#include <utime.h>
#include <errno.h>
#include <assert.h>
#include <glob.h>
#ifndef HAVE_NO_SYS_SELECT_H
#include <sys/select.h>
#endif
#include "putty.h"
#include "psftp.h"
#include "int64.h"
/*
* In PSFTP our selects are synchronous, so these functions are
* empty stubs.
*/
int uxsel_input_add(int fd, int rwx) { return 0; }
void uxsel_input_remove(int id) { }
char *x_get_default(const char *key)
{
return NULL; /* this is a stub */
}
void platform_get_x11_auth(char *display, int *protocol,
unsigned char *data, int *datalen)
{
/* Do nothing, therefore no auth. */
}
/*
* Default settings that are specific to PSFTP.
*/
char *platform_default_s(const char *name)
{
return NULL;
}
int platform_default_i(const char *name, int def)
{
return def;
}
FontSpec platform_default_fontspec(const char *name)
{
FontSpec ret;
*ret.name = '\0';
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 *get_ttymode(void *frontend, const char *mode) { return NULL; }
int get_userpass_input(prompts_t *p, unsigned char *in, int inlen)
{
int ret;
ret = cmdline_get_passwd_input(p, in, inlen);
if (ret == -1)
ret = console_get_userpass_input(p, in, inlen);
return ret;
}
/*
* Set local current directory. Returns NULL on success, or else an
* error message which must be freed after printing.
*/
char *psftp_lcd(char *dir)
{
if (chdir(dir) < 0)
return dupprintf("%s: chdir: %s", dir, strerror(errno));
else
return NULL;
}
/*
* Get local current directory. Returns a string which must be
* freed.
*/
char *psftp_getcwd(void)
{
char *buffer, *ret;
int size = 256;
buffer = snewn(size, char);
while (1) {
ret = getcwd(buffer, size);
if (ret != NULL)
return ret;
if (errno != ERANGE) {
sfree(buffer);
return dupprintf("[cwd unavailable: %s]", strerror(errno));
}
/*
* Otherwise, ERANGE was returned, meaning the buffer
* wasn't big enough.
*/
size = size * 3 / 2;
buffer = sresize(buffer, size, char);
}
}
struct RFile {
int fd;
};
RFile *open_existing_file(char *name, uint64 *size,
unsigned long *mtime, unsigned long *atime)
{
int fd;
RFile *ret;
fd = open(name, O_RDONLY);
if (fd < 0)
return NULL;
ret = snew(RFile);
ret->fd = fd;
if (size || mtime || atime) {
struct stat statbuf;
if (fstat(fd, &statbuf) < 0) {
fprintf(stderr, "%s: stat: %s\n", name, strerror(errno));
memset(&statbuf, 0, sizeof(statbuf));
}
if (size)
*size = uint64_make((statbuf.st_size >> 16) >> 16,
statbuf.st_size);
if (mtime)
*mtime = statbuf.st_mtime;
if (atime)
*atime = statbuf.st_atime;
}
return ret;
}
int read_from_file(RFile *f, void *buffer, int length)
{
return read(f->fd, buffer, length);
}
void close_rfile(RFile *f)
{
close(f->fd);
sfree(f);
}
struct WFile {
int fd;
char *name;
};
WFile *open_new_file(char *name)
{
int fd;
WFile *ret;
fd = open(name, O_CREAT | O_TRUNC | O_WRONLY, 0666);
if (fd < 0)
return NULL;
ret = snew(WFile);
ret->fd = fd;
ret->name = dupstr(name);
return ret;
}
WFile *open_existing_wfile(char *name, uint64 *size)
{
int fd;
WFile *ret;
fd = open(name, O_APPEND | O_WRONLY);
if (fd < 0)
return NULL;
ret = snew(WFile);
ret->fd = fd;
if (size) {
struct stat statbuf;
if (fstat(fd, &statbuf) < 0) {
fprintf(stderr, "%s: stat: %s\n", name, strerror(errno));
memset(&statbuf, 0, sizeof(statbuf));
}
*size = uint64_make((statbuf.st_size >> 16) >> 16,
statbuf.st_size);
}
return ret;
}
int write_to_file(WFile *f, void *buffer, int length)
{
char *p = (char *)buffer;
int so_far = 0;
/* Keep trying until we've really written as much as we can. */
while (length > 0) {
int ret = write(f->fd, p, length);
if (ret < 0)
return ret;
if (ret == 0)
break;
p += ret;
length -= ret;
so_far += ret;
}
return so_far;
}
void set_file_times(WFile *f, unsigned long mtime, unsigned long atime)
{
struct utimbuf ut;
ut.actime = atime;
ut.modtime = mtime;
utime(f->name, &ut);
}
/* Closes and frees the WFile */
void close_wfile(WFile *f)
{
close(f->fd);
sfree(f->name);
sfree(f);
}
/* Seek offset bytes through file, from whence, where whence is
FROM_START, FROM_CURRENT, or FROM_END */
int seek_file(WFile *f, uint64 offset, int whence)
{
off_t fileofft;
int lseek_whence;
fileofft = (((off_t) offset.hi << 16) << 16) + offset.lo;
switch (whence) {
case FROM_START:
lseek_whence = SEEK_SET;
break;
case FROM_CURRENT:
lseek_whence = SEEK_CUR;
break;
case FROM_END:
lseek_whence = SEEK_END;
break;
default:
return -1;
}
return lseek(f->fd, fileofft, lseek_whence) >= 0 ? 0 : -1;
}
uint64 get_file_posn(WFile *f)
{
off_t fileofft;
uint64 ret;
fileofft = lseek(f->fd, (off_t) 0, SEEK_CUR);
ret = uint64_make((fileofft >> 16) >> 16, fileofft);
return ret;
}
int file_type(char *name)
{
struct stat statbuf;
if (stat(name, &statbuf) < 0) {
if (errno != ENOENT)
fprintf(stderr, "%s: stat: %s\n", name, strerror(errno));
return FILE_TYPE_NONEXISTENT;
}
if (S_ISREG(statbuf.st_mode))
return FILE_TYPE_FILE;
if (S_ISDIR(statbuf.st_mode))
return FILE_TYPE_DIRECTORY;
return FILE_TYPE_WEIRD;
}
struct DirHandle {
DIR *dir;
};
DirHandle *open_directory(char *name)
{
DIR *dir;
DirHandle *ret;
dir = opendir(name);
if (!dir)
return NULL;
ret = snew(DirHandle);
ret->dir = dir;
return ret;
}
char *read_filename(DirHandle *dir)
{
struct dirent *de;
do {
de = readdir(dir->dir);
if (de == NULL)
return NULL;
} while ((de->d_name[0] == '.' &&
(de->d_name[1] == '\0' ||
(de->d_name[1] == '.' && de->d_name[2] == '\0'))));
return dupstr(de->d_name);
}
void close_directory(DirHandle *dir)
{
closedir(dir->dir);
sfree(dir);
}
int test_wildcard(char *name, int cmdline)
{
struct stat statbuf;
if (stat(name, &statbuf) == 0) {
return WCTYPE_FILENAME;
} else if (cmdline) {
/*
* On Unix, we never need to parse wildcards coming from
* the command line, because the shell will have expanded
* them into a filename list already.
*/
return WCTYPE_NONEXISTENT;
} else {
glob_t globbed;
int ret = WCTYPE_NONEXISTENT;
if (glob(name, GLOB_ERR, NULL, &globbed) == 0) {
if (globbed.gl_pathc > 0)
ret = WCTYPE_WILDCARD;
globfree(&globbed);
}
return ret;
}
}
/*
* Actually return matching file names for a local wildcard.
*/
struct WildcardMatcher {
glob_t globbed;
int i;
};
WildcardMatcher *begin_wildcard_matching(char *name) {
WildcardMatcher *ret = snew(WildcardMatcher);
if (glob(name, 0, NULL, &ret->globbed) < 0) {
sfree(ret);
return NULL;
}
ret->i = 0;
return ret;
}
char *wildcard_get_filename(WildcardMatcher *dir) {
if (dir->i < dir->globbed.gl_pathc) {
return dupstr(dir->globbed.gl_pathv[dir->i++]);
} else
return NULL;
}
void finish_wildcard_matching(WildcardMatcher *dir) {
globfree(&dir->globbed);
sfree(dir);
}
int vet_filename(char *name)
{
if (strchr(name, '/'))
return FALSE;
if (name[0] == '.' && (!name[1] || (name[1] == '.' && !name[2])))
return FALSE;
return TRUE;
}
int create_directory(char *name)
{
return mkdir(name, 0777) == 0;
}
char *dir_file_cat(char *dir, char *file)
{
return dupcat(dir, "/", file, NULL);
}
/*
* Do a select() between all currently active network fds and
* optionally stdin.
*/
static int ssh_sftp_do_select(int include_stdin, int no_fds_ok)
{
fd_set rset, wset, xset;
int i, fdcount, fdsize, *fdlist;
int fd, fdstate, rwx, ret, maxfd;
long now = GETTICKCOUNT();
fdlist = NULL;
fdcount = fdsize = 0;
do {
/* Count the currently active fds. */
i = 0;
for (fd = first_fd(&fdstate, &rwx); fd >= 0;
fd = next_fd(&fdstate, &rwx)) i++;
if (i < 1 && !no_fds_ok)
return -1; /* doom */
/* Expand the fdlist buffer if necessary. */
if (i > fdsize) {
fdsize = i + 16;
fdlist = sresize(fdlist, fdsize, int);
}
FD_ZERO(&rset);
FD_ZERO(&wset);
FD_ZERO(&xset);
maxfd = 0;
/*
* Add all currently open fds to the select sets, and store
* them in fdlist as well.
*/
fdcount = 0;
for (fd = first_fd(&fdstate, &rwx); fd >= 0;
fd = next_fd(&fdstate, &rwx)) {
fdlist[fdcount++] = fd;
if (rwx & 1)
FD_SET_MAX(fd, maxfd, rset);
if (rwx & 2)
FD_SET_MAX(fd, maxfd, wset);
if (rwx & 4)
FD_SET_MAX(fd, maxfd, xset);
}
if (include_stdin)
FD_SET_MAX(0, maxfd, rset);
do {
long next, ticks;
struct timeval tv, *ptv;
if (run_timers(now, &next)) {
ticks = next - GETTICKCOUNT();
if (ticks <= 0)
ticks = 1; /* just in case */
tv.tv_sec = ticks / 1000;
tv.tv_usec = ticks % 1000 * 1000;
ptv = &tv;
} else {
ptv = NULL;
}
ret = select(maxfd, &rset, &wset, &xset, ptv);
if (ret == 0)
now = next;
else {
long newnow = GETTICKCOUNT();
/*
* Check to see whether the system clock has
* changed massively during the select.
*/
if (newnow - now < 0 || newnow - now > next - now) {
/*
* If so, look at the elapsed time in the
* select and use it to compute a new
* tickcount_offset.
*/
long othernow = now + tv.tv_sec * 1000 + tv.tv_usec / 1000;
/* So we'd like GETTICKCOUNT to have returned othernow,
* but instead it return newnow. Hence ... */
tickcount_offset += othernow - newnow;
now = othernow;
} else {
now = newnow;
}
}
} while (ret < 0 && errno != EINTR);
} while (ret == 0);
if (ret < 0) {
perror("select");
exit(1);
}
for (i = 0; i < fdcount; i++) {
fd = fdlist[i];
/*
* We must process exceptional notifications before
* ordinary readability ones, or we may go straight
* past the urgent marker.
*/
if (FD_ISSET(fd, &xset))
select_result(fd, 4);
if (FD_ISSET(fd, &rset))
select_result(fd, 1);
if (FD_ISSET(fd, &wset))
select_result(fd, 2);
}
sfree(fdlist);
return FD_ISSET(0, &rset) ? 1 : 0;
}
/*
* Wait for some network data and process it.
*/
int ssh_sftp_loop_iteration(void)
{
return ssh_sftp_do_select(FALSE, FALSE);
}
/*
* Read a PSFTP command line from stdin.
*/
char *ssh_sftp_get_cmdline(char *prompt, int no_fds_ok)
{
char *buf;
int buflen, bufsize, ret;
fputs(prompt, stdout);
fflush(stdout);
buf = NULL;
buflen = bufsize = 0;
while (1) {
ret = ssh_sftp_do_select(TRUE, no_fds_ok);
if (ret < 0) {
printf("connection died\n");
return NULL; /* woop woop */
}
if (ret > 0) {
if (buflen >= bufsize) {
bufsize = buflen + 512;
buf = sresize(buf, bufsize, char);
}
ret = read(0, buf+buflen, 1);
if (ret < 0) {
perror("read");
return NULL;
}
if (ret == 0) {
/* eof on stdin; no error, but no answer either */
return NULL;
}
if (buf[buflen++] == '\n') {
/* we have a full line */
return buf;
}
}
}
}
/*
* Main program: do platform-specific initialisation and then call
* psftp_main().
*/
int main(int argc, char *argv[])
{
uxsel_init();
return psftp_main(argc, argv);
}

45
puttysrc/UNIX/UXSIGNAL.C Normal file
View File

@@ -0,0 +1,45 @@
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
/*
* Calling signal() is non-portable, as it varies in meaning
* between platforms and depending on feature macros, and has
* stupid semantics at least some of the time.
*
* This function provides the same interface as the libc function,
* but provides consistent semantics. It assumes POSIX semantics
* for sigaction() (so you might need to do some more work if you
* port to something ancient like SunOS 4)
*/
void (*putty_signal(int sig, void (*func)(int)))(int) {
struct sigaction sa;
struct sigaction old;
sa.sa_handler = func;
if(sigemptyset(&sa.sa_mask) < 0)
return SIG_ERR;
sa.sa_flags = SA_RESTART;
if(sigaction(sig, &sa, &old) < 0)
return SIG_ERR;
return old.sa_handler;
}
void block_signal(int sig, int block_it)
{
sigset_t ss;
sigemptyset(&ss);
sigaddset(&ss, sig);
if(sigprocmask(block_it ? SIG_BLOCK : SIG_UNBLOCK, &ss, 0) < 0) {
perror("sigprocmask");
exit(1);
}
}
/*
Local Variables:
c-basic-offset:4
comment-column:40
End:
*/

582
puttysrc/UNIX/UXSTORE.C Normal file
View File

@@ -0,0 +1,582 @@
/*
* uxstore.c: Unix-specific implementation of the interface defined
* in storage.h.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
#include <ctype.h>
#include <limits.h>
#include <unistd.h>
#include <fcntl.h>
#include <dirent.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "putty.h"
#include "storage.h"
#include "tree234.h"
#ifdef PATH_MAX
#define FNLEN PATH_MAX
#else
#define FNLEN 1024 /* XXX */
#endif
enum {
INDEX_DIR, INDEX_HOSTKEYS, INDEX_HOSTKEYS_TMP, INDEX_RANDSEED,
INDEX_SESSIONDIR, INDEX_SESSION,
};
static const char hex[16] = "0123456789ABCDEF";
static char *mungestr(const char *in)
{
char *out, *ret;
if (!in || !*in)
in = "Default Settings";
ret = out = snewn(3*strlen(in)+1, char);
while (*in) {
/*
* There are remarkably few punctuation characters that
* aren't shell-special in some way or likely to be used as
* separators in some file format or another! Hence we use
* opt-in for safe characters rather than opt-out for
* specific unsafe ones...
*/
if (*in!='+' && *in!='-' && *in!='.' && *in!='@' && *in!='_' &&
!(*in >= '0' && *in <= '9') &&
!(*in >= 'A' && *in <= 'Z') &&
!(*in >= 'a' && *in <= 'z')) {
*out++ = '%';
*out++ = hex[((unsigned char) *in) >> 4];
*out++ = hex[((unsigned char) *in) & 15];
} else
*out++ = *in;
in++;
}
*out = '\0';
return ret;
}
static char *unmungestr(const char *in)
{
char *out, *ret;
out = ret = snewn(strlen(in)+1, char);
while (*in) {
if (*in == '%' && in[1] && in[2]) {
int i, j;
i = in[1] - '0';
i -= (i > 9 ? 7 : 0);
j = in[2] - '0';
j -= (j > 9 ? 7 : 0);
*out++ = (i << 4) + j;
in += 3;
} else {
*out++ = *in++;
}
}
*out = '\0';
return ret;
}
static void make_filename(char *filename, int index, const char *subname)
{
char *home;
int len;
home = getenv("HOME");
if (!home)
home="/";
strncpy(filename, home, FNLEN);
len = strlen(filename);
if (index == INDEX_SESSION) {
char *munged = mungestr(subname);
char *fn = dupprintf("/.putty/sessions/%s", munged);
strncpy(filename + len, fn, FNLEN - len);
sfree(fn);
sfree(munged);
} else {
strncpy(filename + len,
index == INDEX_DIR ? "/.putty" :
index == INDEX_SESSIONDIR ? "/.putty/sessions" :
index == INDEX_HOSTKEYS ? "/.putty/sshhostkeys" :
index == INDEX_HOSTKEYS_TMP ? "/.putty/sshhostkeys.tmp" :
index == INDEX_RANDSEED ? "/.putty/randomseed" :
"/.putty/ERROR", FNLEN - len);
}
filename[FNLEN-1] = '\0';
}
void *open_settings_w(const char *sessionname, char **errmsg)
{
char filename[FNLEN];
FILE *fp;
*errmsg = NULL;
/*
* Start by making sure the .putty directory and its sessions
* subdir actually exist. Ignore error returns from mkdir since
* they're perfectly likely to be `already exists', and any
* other error will trip us up later on so there's no real need
* to catch it now.
*/
make_filename(filename, INDEX_DIR, sessionname);
mkdir(filename, 0700);
make_filename(filename, INDEX_SESSIONDIR, sessionname);
mkdir(filename, 0700);
make_filename(filename, INDEX_SESSION, sessionname);
fp = fopen(filename, "w");
if (!fp) {
*errmsg = dupprintf("Unable to create %s: %s",
filename, strerror(errno));
return NULL; /* can't open */
}
return fp;
}
void write_setting_s(void *handle, const char *key, const char *value)
{
FILE *fp = (FILE *)handle;
fprintf(fp, "%s=%s\n", key, value);
}
void write_setting_i(void *handle, const char *key, int value)
{
FILE *fp = (FILE *)handle;
fprintf(fp, "%s=%d\n", key, value);
}
void close_settings_w(void *handle)
{
FILE *fp = (FILE *)handle;
fclose(fp);
}
/*
* Reading settings, for the moment, is done by retrieving X
* resources from the X display. When we introduce disk files, I
* think what will happen is that the X resources will override
* PuTTY's inbuilt defaults, but that the disk files will then
* override those. This isn't optimal, but it's the best I can
* immediately work out.
* FIXME: the above comment is a bit out of date. Did it happen?
*/
struct keyval {
const char *key;
const char *value;
};
static tree234 *xrmtree = NULL;
int keycmp(void *av, void *bv)
{
struct keyval *a = (struct keyval *)av;
struct keyval *b = (struct keyval *)bv;
return strcmp(a->key, b->key);
}
void provide_xrm_string(char *string)
{
char *p, *q, *key;
struct keyval *xrms, *ret;
p = q = strchr(string, ':');
if (!q) {
fprintf(stderr, "pterm: expected a colon in resource string"
" \"%s\"\n", string);
return;
}
q++;
while (p > string && p[-1] != '.' && p[-1] != '*')
p--;
xrms = snew(struct keyval);
key = snewn(q-p, char);
memcpy(key, p, q-p);
key[q-p-1] = '\0';
xrms->key = key;
while (*q && isspace((unsigned char)*q))
q++;
xrms->value = dupstr(q);
if (!xrmtree)
xrmtree = newtree234(keycmp);
ret = add234(xrmtree, xrms);
if (ret) {
/* Override an existing string. */
del234(xrmtree, ret);
add234(xrmtree, xrms);
}
}
const char *get_setting(const char *key)
{
struct keyval tmp, *ret;
tmp.key = key;
if (xrmtree) {
ret = find234(xrmtree, &tmp, NULL);
if (ret)
return ret->value;
}
return x_get_default(key);
}
void *open_settings_r(const char *sessionname)
{
char filename[FNLEN];
FILE *fp;
char *line;
tree234 *ret;
make_filename(filename, INDEX_SESSION, sessionname);
fp = fopen(filename, "r");
if (!fp)
return NULL; /* can't open */
ret = newtree234(keycmp);
while ( (line = fgetline(fp)) ) {
char *value = strchr(line, '=');
struct keyval *kv;
if (!value)
continue;
*value++ = '\0';
value[strcspn(value, "\r\n")] = '\0'; /* trim trailing NL */
kv = snew(struct keyval);
kv->key = dupstr(line);
kv->value = dupstr(value);
add234(ret, kv);
sfree(line);
}
fclose(fp);
return ret;
}
char *read_setting_s(void *handle, const char *key, char *buffer, int buflen)
{
tree234 *tree = (tree234 *)handle;
const char *val;
struct keyval tmp, *kv;
tmp.key = key;
if (tree != NULL &&
(kv = find234(tree, &tmp, NULL)) != NULL) {
val = kv->value;
assert(val != NULL);
} else
val = get_setting(key);
if (!val)
return NULL;
else {
strncpy(buffer, val, buflen);
buffer[buflen-1] = '\0';
return buffer;
}
}
int read_setting_i(void *handle, const char *key, int defvalue)
{
tree234 *tree = (tree234 *)handle;
const char *val;
struct keyval tmp, *kv;
tmp.key = key;
if (tree != NULL &&
(kv = find234(tree, &tmp, NULL)) != NULL) {
val = kv->value;
assert(val != NULL);
} else
val = get_setting(key);
if (!val)
return defvalue;
else
return atoi(val);
}
int read_setting_fontspec(void *handle, const char *name, FontSpec *result)
{
return !!read_setting_s(handle, name, result->name, sizeof(result->name));
}
int read_setting_filename(void *handle, const char *name, Filename *result)
{
return !!read_setting_s(handle, name, result->path, sizeof(result->path));
}
void write_setting_fontspec(void *handle, const char *name, FontSpec result)
{
write_setting_s(handle, name, result.name);
}
void write_setting_filename(void *handle, const char *name, Filename result)
{
write_setting_s(handle, name, result.path);
}
void close_settings_r(void *handle)
{
tree234 *tree = (tree234 *)handle;
struct keyval *kv;
if (!tree)
return;
while ( (kv = index234(tree, 0)) != NULL) {
del234(tree, kv);
sfree((char *)kv->key);
sfree((char *)kv->value);
sfree(kv);
}
freetree234(tree);
}
void del_settings(const char *sessionname)
{
char filename[FNLEN];
make_filename(filename, INDEX_SESSION, sessionname);
unlink(filename);
}
void *enum_settings_start(void)
{
DIR *dp;
char filename[FNLEN];
make_filename(filename, INDEX_SESSIONDIR, NULL);
dp = opendir(filename);
return dp;
}
char *enum_settings_next(void *handle, char *buffer, int buflen)
{
DIR *dp = (DIR *)handle;
struct dirent *de;
struct stat st;
char fullpath[FNLEN];
int len;
char *unmunged;
make_filename(fullpath, INDEX_SESSIONDIR, NULL);
len = strlen(fullpath);
while ( (de = readdir(dp)) != NULL ) {
if (len < FNLEN) {
fullpath[len] = '/';
strncpy(fullpath+len+1, de->d_name, FNLEN-(len+1));
fullpath[FNLEN-1] = '\0';
}
if (stat(fullpath, &st) < 0 || !S_ISREG(st.st_mode))
continue; /* try another one */
unmunged = unmungestr(de->d_name);
strncpy(buffer, unmunged, buflen);
buffer[buflen-1] = '\0';
sfree(unmunged);
return buffer;
}
return NULL;
}
void enum_settings_finish(void *handle)
{
DIR *dp = (DIR *)handle;
closedir(dp);
}
/*
* Lines in the host keys file are of the form
*
* type@port:hostname keydata
*
* e.g.
*
* rsa@22:foovax.example.org 0x23,0x293487364395345345....2343
*/
int verify_host_key(const char *hostname, int port,
const char *keytype, const char *key)
{
FILE *fp;
char filename[FNLEN];
char *line;
int ret;
make_filename(filename, INDEX_HOSTKEYS, NULL);
fp = fopen(filename, "r");
if (!fp)
return 1; /* key does not exist */
ret = 1;
while ( (line = fgetline(fp)) ) {
int i;
char *p = line;
char porttext[20];
line[strcspn(line, "\n")] = '\0'; /* strip trailing newline */
i = strlen(keytype);
if (strncmp(p, keytype, i))
goto done;
p += i;
if (*p != '@')
goto done;
p++;
sprintf(porttext, "%d", port);
i = strlen(porttext);
if (strncmp(p, porttext, i))
goto done;
p += i;
if (*p != ':')
goto done;
p++;
i = strlen(hostname);
if (strncmp(p, hostname, i))
goto done;
p += i;
if (*p != ' ')
goto done;
p++;
/*
* Found the key. Now just work out whether it's the right
* one or not.
*/
if (!strcmp(p, key))
ret = 0; /* key matched OK */
else
ret = 2; /* key mismatch */
done:
sfree(line);
if (ret != 1)
break;
}
fclose(fp);
return ret;
}
void store_host_key(const char *hostname, int port,
const char *keytype, const char *key)
{
FILE *rfp, *wfp;
char *newtext, *line;
int headerlen;
char filename[FNLEN], tmpfilename[FNLEN];
newtext = dupprintf("%s@%d:%s %s\n", keytype, port, hostname, key);
headerlen = 1 + strcspn(newtext, " "); /* count the space too */
/*
* Open both the old file and a new file.
*/
make_filename(tmpfilename, INDEX_HOSTKEYS_TMP, NULL);
wfp = fopen(tmpfilename, "w");
if (!wfp) {
char dir[FNLEN];
make_filename(dir, INDEX_DIR, NULL);
mkdir(dir, 0700);
wfp = fopen(tmpfilename, "w");
}
if (!wfp)
return;
make_filename(filename, INDEX_HOSTKEYS, NULL);
rfp = fopen(filename, "r");
/*
* Copy all lines from the old file to the new one that _don't_
* involve the same host key identifier as the one we're adding.
*/
if (rfp) {
while ( (line = fgetline(rfp)) ) {
if (strncmp(line, newtext, headerlen))
fputs(line, wfp);
}
fclose(rfp);
}
/*
* Now add the new line at the end.
*/
fputs(newtext, wfp);
fclose(wfp);
rename(tmpfilename, filename);
sfree(newtext);
}
void read_random_seed(noise_consumer_t consumer)
{
int fd;
char fname[FNLEN];
make_filename(fname, INDEX_RANDSEED, NULL);
fd = open(fname, O_RDONLY);
if (fd) {
char buf[512];
int ret;
while ( (ret = read(fd, buf, sizeof(buf))) > 0)
consumer(buf, ret);
close(fd);
}
}
void write_random_seed(void *data, int len)
{
int fd;
char fname[FNLEN];
make_filename(fname, INDEX_RANDSEED, NULL);
/*
* Don't truncate the random seed file if it already exists; if
* something goes wrong half way through writing it, it would
* be better to leave the old data there than to leave it empty.
*/
fd = open(fname, O_CREAT | O_WRONLY, 0600);
if (fd < 0) {
char dir[FNLEN];
make_filename(dir, INDEX_DIR, NULL);
mkdir(dir, 0700);
fd = open(fname, O_CREAT | O_WRONLY, 0600);
}
while (len > 0) {
int ret = write(fd, data, len);
if (ret <= 0) break;
len -= ret;
data = (char *)data + len;
}
close(fd);
}
void cleanup_all(void)
{
}

273
puttysrc/UNIX/UXUCS.C Normal file
View File

@@ -0,0 +1,273 @@
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <locale.h>
#include <limits.h>
#include <wchar.h>
#include <time.h>
#include "putty.h"
#include "charset.h"
#include "terminal.h"
#include "misc.h"
/*
* Unix Unicode-handling routines.
*/
int is_dbcs_leadbyte(int codepage, char byte)
{
return 0; /* we don't do DBCS */
}
int mb_to_wc(int codepage, int flags, char *mbstr, int mblen,
wchar_t *wcstr, int wclen)
{
if (codepage == DEFAULT_CODEPAGE) {
int n = 0;
mbstate_t state;
memset(&state, 0, sizeof state);
setlocale(LC_CTYPE, "");
while (mblen > 0) {
size_t i = mbrtowc(wcstr+n, mbstr, (size_t)mblen, &state);
if (i == (size_t)-1 || i == (size_t)-2)
break;
n++;
mbstr += i;
mblen -= i;
}
setlocale(LC_CTYPE, "C");
return n;
} else if (codepage == CS_NONE) {
int n = 0;
while (mblen > 0) {
wcstr[n] = 0xD800 | (mbstr[0] & 0xFF);
n++;
mbstr++;
mblen--;
}
return n;
} else
return charset_to_unicode(&mbstr, &mblen, wcstr, wclen, codepage,
NULL, NULL, 0);
}
int wc_to_mb(int codepage, int flags, wchar_t *wcstr, int wclen,
char *mbstr, int mblen, char *defchr, int *defused,
struct unicode_data *ucsdata)
{
/* FIXME: we should remove the defused param completely... */
if (defused)
*defused = 0;
if (codepage == DEFAULT_CODEPAGE) {
char output[MB_LEN_MAX];
mbstate_t state;
int n = 0;
memset(&state, 0, sizeof state);
setlocale(LC_CTYPE, "");
while (wclen > 0) {
int i = wcrtomb(output, wcstr[0], &state);
if (i == (size_t)-1 || i > n - mblen)
break;
memcpy(mbstr+n, output, i);
n += i;
wcstr++;
wclen--;
}
setlocale(LC_CTYPE, "C");
return n;
} else if (codepage == CS_NONE) {
int n = 0;
while (wclen > 0 && n < mblen) {
if (*wcstr >= 0xD800 && *wcstr < 0xD900)
mbstr[n++] = (*wcstr & 0xFF);
else if (defchr)
mbstr[n++] = *defchr;
wcstr++;
wclen--;
}
return n;
} else {
return charset_from_unicode(&wcstr, &wclen, mbstr, mblen, codepage,
NULL, defchr?defchr:NULL, defchr?1:0);
}
}
/*
* Return value is TRUE if pterm is to run in direct-to-font mode.
*/
int init_ucs(struct unicode_data *ucsdata, char *linecharset,
int utf8_override, int font_charset, int vtmode)
{
int i, ret = 0;
/*
* In the platform-independent parts of the code, font_codepage
* is used only for system DBCS support - which we don't
* support at all. So we set this to something which will never
* be used.
*/
ucsdata->font_codepage = -1;
/*
* If utf8_override is set and the POSIX locale settings
* dictate a UTF-8 character set, then just go straight for
* UTF-8.
*/
ucsdata->line_codepage = CS_NONE;
if (utf8_override) {
const char *s;
if (((s = getenv("LC_ALL")) && *s) ||
((s = getenv("LC_CTYPE")) && *s) ||
((s = getenv("LANG")) && *s)) {
if (strstr(s, "UTF-8"))
ucsdata->line_codepage = CS_UTF8;
}
}
/*
* Failing that, line_codepage should be decoded from the
* specification in cfg.
*/
if (ucsdata->line_codepage == CS_NONE)
ucsdata->line_codepage = decode_codepage(linecharset);
/*
* If line_codepage is _still_ CS_NONE, we assume we're using
* the font's own encoding. This has been passed in to us, so
* we use that. If it's still CS_NONE after _that_ - i.e. the
* font we were given had an incomprehensible charset - then we
* fall back to using the D800 page.
*/
if (ucsdata->line_codepage == CS_NONE)
ucsdata->line_codepage = font_charset;
if (ucsdata->line_codepage == CS_NONE)
ret = 1;
/*
* Set up unitab_line, by translating each individual character
* in the line codepage into Unicode.
*/
for (i = 0; i < 256; i++) {
char c[1], *p;
wchar_t wc[1];
int len;
c[0] = i;
p = c;
len = 1;
if (ucsdata->line_codepage == CS_NONE)
ucsdata->unitab_line[i] = 0xD800 | i;
else if (1 == charset_to_unicode(&p, &len, wc, 1,
ucsdata->line_codepage,
NULL, L"", 0))
ucsdata->unitab_line[i] = wc[0];
else
ucsdata->unitab_line[i] = 0xFFFD;
}
/*
* Set up unitab_xterm. This is the same as unitab_line except
* in the line-drawing regions, where it follows the Unicode
* encoding.
*
* (Note that the strange X encoding of line-drawing characters
* in the bottom 32 glyphs of ISO8859-1 fonts is taken care of
* by the font encoding, which will spot such a font and act as
* if it were in a variant encoding of ISO8859-1.)
*/
for (i = 0; i < 256; i++) {
static const wchar_t unitab_xterm_std[32] = {
0x2666, 0x2592, 0x2409, 0x240c, 0x240d, 0x240a, 0x00b0, 0x00b1,
0x2424, 0x240b, 0x2518, 0x2510, 0x250c, 0x2514, 0x253c, 0x23ba,
0x23bb, 0x2500, 0x23bc, 0x23bd, 0x251c, 0x2524, 0x2534, 0x252c,
0x2502, 0x2264, 0x2265, 0x03c0, 0x2260, 0x00a3, 0x00b7, 0x0020
};
static const wchar_t unitab_xterm_poorman[32] =
L"*#****o~**+++++-----++++|****L. ";
const wchar_t *ptr;
if (vtmode == VT_POORMAN)
ptr = unitab_xterm_poorman;
else
ptr = unitab_xterm_std;
if (i >= 0x5F && i < 0x7F)
ucsdata->unitab_xterm[i] = ptr[i & 0x1F];
else
ucsdata->unitab_xterm[i] = ucsdata->unitab_line[i];
}
/*
* Set up unitab_scoacs. The SCO Alternate Character Set is
* simply CP437.
*/
for (i = 0; i < 256; i++) {
char c[1], *p;
wchar_t wc[1];
int len;
c[0] = i;
p = c;
len = 1;
if (1 == charset_to_unicode(&p, &len, wc, 1, CS_CP437, NULL, L"", 0))
ucsdata->unitab_scoacs[i] = wc[0];
else
ucsdata->unitab_scoacs[i] = 0xFFFD;
}
/*
* Find the control characters in the line codepage. For
* direct-to-font mode using the D800 hack, we assume 00-1F and
* 7F are controls, but allow 80-9F through. (It's as good a
* guess as anything; and my bet is that half the weird fonts
* used in this way will be IBM or MS code pages anyway.)
*/
for (i = 0; i < 256; i++) {
int lineval = ucsdata->unitab_line[i];
if (lineval < ' ' || (lineval >= 0x7F && lineval < 0xA0) ||
(lineval >= 0xD800 && lineval < 0xD820) || (lineval == 0xD87F))
ucsdata->unitab_ctrl[i] = i;
else
ucsdata->unitab_ctrl[i] = 0xFF;
}
return ret;
}
const char *cp_name(int codepage)
{
if (codepage == CS_NONE)
return "Use font encoding";
return charset_to_localenc(codepage);
}
const char *cp_enumerate(int index)
{
int charset;
if (index == 0)
return "Use font encoding";
charset = charset_localenc_nth(index-1);
if (charset == CS_NONE)
return NULL;
return charset_to_localenc(charset);
}
int decode_codepage(char *cp_name)
{
if (!*cp_name)
return CS_NONE; /* use font encoding */
return charset_from_localenc(cp_name);
}

121
puttysrc/UNIX/UX_X11.C Normal file
View File

@@ -0,0 +1,121 @@
/*
* ux_x11.c: fetch local auth data for X forwarding.
*/
#include <ctype.h>
#include <unistd.h>
#include <assert.h>
#include "putty.h"
#include "ssh.h"
void platform_get_x11_auth(char *display, int *protocol,
unsigned char *data, int *datalen)
{
FILE *fp;
char *command;
int maxsize = *datalen;
char *localbuf;
int proto = -1;
display = x11_display(display);
/*
* Normally we should run `xauth list DISPLAYNAME'. However,
* there's an oddity when the display is local: the display
* `localhost:0' (or `:0') should become just `:0'.
*/
if (!strncmp(display, "localhost:", 10)
|| !strncmp(display, "unix:", 5))
command = dupprintf("xauth list %s 2>/dev/null",
strchr(display, ':'));
else
command = dupprintf("xauth list %s 2>/dev/null", display);
sfree(display);
fp = popen(command, "r");
sfree(command);
if (!fp)
return; /* assume no auth */
localbuf = snewn(maxsize, char);
while (1) {
/*
* Read a line from stdin, and attempt to parse it into a
* display name (ignored), auth protocol, and auth string.
*/
int c, i, hexdigit;
char protoname[64];
/* Skip the display name. */
while (c = getc(fp), c != EOF && c != '\n' && !isspace(c));
if (c == EOF) break;
if (c == '\n') continue;
/* Skip white space. */
while (c != EOF && c != '\n' && isspace(c))
c = getc(fp);
if (c == EOF) break;
if (c == '\n') continue;
/* Read the auth protocol name, and see if it matches any we
* know about. */
i = 0;
while (c != EOF && c != '\n' && !isspace(c)) {
if (i < lenof(protoname)-1) protoname[i++] = c;
c = getc(fp);
}
protoname[i] = '\0';
for (i = X11_NO_AUTH; ++i < X11_NAUTHS ;) {
if (!strcmp(protoname, x11_authnames[i]))
break;
}
if (i >= X11_NAUTHS || i <= proto) {
/* Unrecognised protocol name, or a worse one than we already have.
* Skip this line. */
while (c != EOF && c != '\n')
c = getc(fp);
if (c == EOF) break;
}
proto = i;
/* Skip white space. */
while (c != EOF && c != '\n' && isspace(c))
c = getc(fp);
if (c == EOF) break;
if (c == '\n') continue;
/*
* Now grab pairs of hex digits and shove them into `data'.
*/
i = 0;
hexdigit = -1;
while (c != EOF && c != '\n') {
int hexval = -1;
if (c >= 'A' && c <= 'F')
hexval = c + 10 - 'A';
if (c >= 'a' && c <= 'f')
hexval = c + 10 - 'a';
if (c >= '0' && c <= '9')
hexval = c - '0';
if (hexval >= 0) {
if (hexdigit >= 0) {
hexdigit = (hexdigit << 4) + hexval;
if (i < maxsize)
localbuf[i++] = hexdigit;
hexdigit = -1;
} else
hexdigit = hexval;
}
c = getc(fp);
}
*datalen = i;
*protocol = proto;
memcpy(data, localbuf, i);
/* Nonetheless, continue looping round; we might find a better one. */
}
pclose(fp);
sfree(localbuf);
}

1011
puttysrc/UNIX/XKEYSYM.C Normal file

File diff suppressed because it is too large Load Diff

150
puttysrc/UNIX/XPMPTCFG.C Normal file
View File

@@ -0,0 +1,150 @@
/* XPM */
static const char *const cfg_icon_0[] = {
/* columns rows colors chars-per-pixel */
"16 16 9 1",
" c black",
". c navy",
"X c blue",
"o c #808000",
"O c yellow",
"+ c #808080",
"@ c #C0C0C0",
"# c gray100",
"$ c None",
/* pixels */
"$$$ $$$$$$$$$$$",
"$$ OO $$$$",
"$ +oO+###@+ $$$",
" o #.oO.XX@+ $$$",
" oO+.OO.XX@+ $$$",
"$ oOOOO.XX@+ $$$",
"$$ oooOO.X@+ $$$",
"$$ +..oOO.@+ $$$",
"$$ @@@+oOO++ $$",
"$ +++++ oOO #+ $",
" #######+oOO++ $",
" #@@@@@++ oOO $",
" @++++++++ oOO $",
"$ oOO ",
"$$$$$$$$$$$$ oO ",
"$$$$$$$$$$$$$ $"
};
/* XPM */
static const char *const cfg_icon_1[] = {
/* columns rows colors chars-per-pixel */
"32 32 9 1",
" c black",
". c navy",
"X c blue",
"o c #808000",
"O c yellow",
"+ c #808080",
"@ c #C0C0C0",
"# c gray100",
"$ c None",
/* pixels */
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$ OO $$$$$$$$$$$$$$$$$$$$$$",
"$$$$$ ooOO $$$$$$$$$$$$$$$$$$$$$",
"$$$$$$ ooOO $$$$$$",
"$$ $$$ oOO @@@@@@@@@@@@@+ $$$$$",
"$ oO $$ oOOO @@@@@@@@@@@++ $$$$$",
"$ oOO oOOOO #########@+++ $$$$$",
"$$ oOOOOOOO ..........@+++ $$$$$",
"$$ ooOOOOOOO XXXXXXXXX@+++ $$$$$",
"$$$ ooooooOOO XXXXXXXX@+++ $$$$$",
"$$$$ oo ooOOO XXXXXXX@+++ $$$$$",
"$$$$$$ . ooOOO XXXXXX@+++ $$$$$",
"$$$$$$ #.X ooOOO XXXXX@+++ $$$$$",
"$$$$$$ #.XX ooOOO XXXX@+++ $$$$$",
"$$$$$$ #.XXX ooOOO XXX@+++ $$$$$",
"$$$$$$ #.XXXX ooOOO XX@+++ $$$$$",
"$$$$$$ ####### ooOOO #@+++ $$$",
"$$$$$ #@@@@@@@ ooOOO +++ @#+ $$",
"$$$$ @ @++++++++ ooOOO + @#++ $$",
"$$$ @@ ooOOO @#+++ $$",
"$$ ############### ooOOO @+++ $$",
"$$ #@@@@@@@@@@@@@@@ ooOOO +++ $$",
"$$ #@@@@@@@@@@@@@@@@ ooOOO + $$$",
"$$ #@@@@@@@@@@@@+ ooOOO $$$$",
"$$ @++++++++++++++++++ ooOOO $$$",
"$$$ ooOOO $$",
"$$$$$$$$$$$$$$$$$$$$$$$$ ooO $$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$ o $$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"
};
/* XPM */
static const char *const cfg_icon_2[] = {
/* columns rows colors chars-per-pixel */
"48 48 9 1",
" c black",
". c navy",
"X c blue",
"o c #808000",
"O c yellow",
"+ c #808080",
"@ c #C0C0C0",
"# c gray100",
"$ c None",
/* pixels */
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$ OO $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$ oOOOO $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$ ooOOO $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$ ooOOO $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$ oOOO $$$$$$$$$$",
"$$$ $$$$$$ oOOO @@@@@@@@@@@@@@@@@@@@+ $$$$$$$$$",
"$$ oO $$$$$ oOOOO @@@@@@@@@@@@@@@@@@++ $$$$$$$$$",
"$$ ooO $$$ oOOOO @@@@@@@@@@@@@@@@@+++ $$$$$$$$$",
"$$$ oOO OOOOO ################@++++ $$$$$$$$$",
"$$$ ooOOOOOOOOOOO ++++++++++++++@+++++ $$$$$$$$$",
"$$$ ooOOOOOOOOOOOO .............#+++++ $$$$$$$$$",
"$$$$ oooOOOOoOOOOOO XXXXXXXXXXXX#+++++ $$$$$$$$$",
"$$$$$ oooooooOOOOOOO XXXXXXXXXXX#+++++ $$$$$$$$$",
"$$$$$$ oo ooOOOOOOO XXXXXXXXXX#+++++ $$$$$$$$$",
"$$$$$$$$$ + ooOOOOOOO XXXXXXXXX#+++++ $$$$$$$$$",
"$$$$$$$$$ #+. ooOOOOOOO XXXXXXXX#+++++ $$$$$$$$$",
"$$$$$$$$$ #+.X ooOOOOOOO XXXXXXX#+++++ $$$$$$$$$",
"$$$$$$$$$ #+.XX ooOOOOOOO XXXXXX#+++++ $$$$$$$$$",
"$$$$$$$$$ #+.XXX ooOOOOOOO XXXXX#+++++ $$$$$$$$$",
"$$$$$$$$$ #+.XXXX ooOOOOOOO XXXX#+++++ $$$$$$$$$",
"$$$$$$$$$ #+.XXXXX ooOOOOOOO XXX#+++++ $$$$$$$$$",
"$$$$$$$$$ #+.XXXXXX ooOOOOOOO XX#+++++ $$$$$$$$$",
"$$$$$$$$$ #+.XXXXXXX ooOOOOOOO X#+++++ $$$$$$$$$",
"$$$$$$$$$ #+.XXXXXXXX ooOOOOOOO #+++++ $$$$$$$$$",
"$$$$$$$$ #@########## ooOOOOOOO +++++ $$$$$",
"$$$$$$$ @ #@@@@@@@@@@@@ ooOOOOOOO +++ @@##+ $$$$",
"$$$$$$ @@ #@@@@@@@@@@@@@ ooOOOOOOO + @@##++ $$$$",
"$$$$$ @@@ @++++++++++++++ ooOOOOOOO @@##+++ $$$$",
"$$$$ @@@@ ooOOOOOOO ##++++ $$$$",
"$$$ ####################### ooOOOOOOO @++++ $$$$",
"$$$ ######################## ooOOOOOOO ++++ $$$$",
"$$$ ##@@@@@@@@@@@@@@@@@@@@@@@ ooOOOOOOO +++ $$$$",
"$$$ ##@@@@@@@@@@@@@@@@@@@@@@@@ ooOOOOOOO ++ $$$$",
"$$$ ##@@@@@@@@@@@@@@@@@@@@@@@@@ ooOOOOOOO $$$$$",
"$$$ ##@@@@@@@@@@@@@@@@@@ ooOOOOOOO $$$$$",
"$$$ @@+++++++++++++++++++++++++++ ooOOOOOOO $$$$",
"$$$ @@++++++++++++++++++++++++++++ ooOOOOOOO $$$",
"$$$$ ooOOOOO $$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ooOOO $$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ooO $$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ o $$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"
};
const char *const *const cfg_icon[] = {
cfg_icon_0,
cfg_icon_1,
cfg_icon_2,
};
const int n_cfg_icon = 3;

143
puttysrc/UNIX/XPMPTERM.C Normal file
View File

@@ -0,0 +1,143 @@
/* XPM */
static const char *const main_icon_0[] = {
/* columns rows colors chars-per-pixel */
"16 16 6 1",
" c black",
". c blue",
"X c #808080",
"o c #C0C0C0",
"O c gray100",
"+ c None",
/* pixels */
"++++++++++++++++",
"+++ ++++",
"++ OOOOOOOoX +++",
"++ O......oX +++",
"++ O......oX +++",
"++ O......oX +++",
"++ O......oX +++",
"++ O......oX +++",
"++ ooooooooX ++",
"+ XXXXXXXXXXOX +",
" OOOOOOOOOOOoX +",
" OoooooXXXXoXX +",
" oXXXXXXXXXXX ++",
"+ +++",
"++++++++++++++++",
"++++++++++++++++"
};
/* XPM */
static const char *const main_icon_1[] = {
/* columns rows colors chars-per-pixel */
"32 32 7 1",
" c black",
". c navy",
"X c blue",
"o c #808080",
"O c #C0C0C0",
"+ c gray100",
"@ c None",
/* pixels */
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@ @@@@@@",
"@@@@@@@@ OOOOOOOOOOOOOOOOo @@@@@",
"@@@@@@@ OOOOOOOOOOOOOOOOoo @@@@@",
"@@@@@@ +++++++++++++++Oooo @@@@@",
"@@@@@@ +..............Oooo @@@@@",
"@@@@@@ +.XXXXXXXXXXXXXOooo @@@@@",
"@@@@@@ +.XXXXXXXXXXXXXOooo @@@@@",
"@@@@@@ +.XXXXXXXXXXXXXOooo @@@@@",
"@@@@@@ +.XXXXXXXXXXXXXOooo @@@@@",
"@@@@@@ +.XXXXXXXXXXXXXOooo @@@@@",
"@@@@@@ +.XXXXXXXXXXXXXOooo @@@@@",
"@@@@@@ +.XXXXXXXXXXXXXOooo @@@@@",
"@@@@@@ +.XXXXXXXXXXXXXOooo @@@@@",
"@@@@@@ +++++++++++++++Oooo @@@",
"@@@@@ +OOOOOOOOOOOOOOooo O+o @@",
"@@@@ O Ooooooooooooooooo O+oo @@",
"@@@ OO O+ooo @@",
"@@ ++++++++++++++++++++++Oooo @@",
"@@ +OOOOOOOOOOOOOOOOOOOOOoooo @@",
"@@ +OOOOOOOOOOOOOOOOOOOOOooo @@@",
"@@ +OOOOOOOOOOOOo oOoo @@@@",
"@@ Ooooooooooooooooooooooo @@@@@",
"@@@ @@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
};
/* XPM */
static const char *const main_icon_2[] = {
/* columns rows colors chars-per-pixel */
"48 48 7 1",
" c black",
". c navy",
"X c blue",
"o c #808080",
"O c #C0C0C0",
"+ c gray100",
"@ c None",
/* pixels */
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@ @@@@@@@@@@",
"@@@@@@@@@@@@ OOOOOOOOOOOOOOOOOOOOOOOOo @@@@@@@@@",
"@@@@@@@@@@@ OOOOOOOOOOOOOOOOOOOOOOOOoo @@@@@@@@@",
"@@@@@@@@@@ OOOOOOOOOOOOOOOOOOOOOOOOooo @@@@@@@@@",
"@@@@@@@@@ +++++++++++++++++++++++Ooooo @@@@@@@@@",
"@@@@@@@@@ +oooooooooooooooooooooOooooo @@@@@@@@@",
"@@@@@@@@@ +o....................+ooooo @@@@@@@@@",
"@@@@@@@@@ +o.XXXXXXXXXXXXXXXXXXX+ooooo @@@@@@@@@",
"@@@@@@@@@ +o.XXXXXXXXXXXXXXXXXXX+ooooo @@@@@@@@@",
"@@@@@@@@@ +o.XXXXXXXXXXXXXXXXXXX+ooooo @@@@@@@@@",
"@@@@@@@@@ +o.XXXXXXXXXXXXXXXXXXX+ooooo @@@@@@@@@",
"@@@@@@@@@ +o.XXXXXXXXXXXXXXXXXXX+ooooo @@@@@@@@@",
"@@@@@@@@@ +o.XXXXXXXXXXXXXXXXXXX+ooooo @@@@@@@@@",
"@@@@@@@@@ +o.XXXXXXXXXXXXXXXXXXX+ooooo @@@@@@@@@",
"@@@@@@@@@ +o.XXXXXXXXXXXXXXXXXXX+ooooo @@@@@@@@@",
"@@@@@@@@@ +o.XXXXXXXXXXXXXXXXXXX+ooooo @@@@@@@@@",
"@@@@@@@@@ +o.XXXXXXXXXXXXXXXXXXX+ooooo @@@@@@@@@",
"@@@@@@@@@ +o.XXXXXXXXXXXXXXXXXXX+ooooo @@@@@@@@@",
"@@@@@@@@@ +o.XXXXXXXXXXXXXXXXXXX+ooooo @@@@@@@@@",
"@@@@@@@@@ +o.XXXXXXXXXXXXXXXXXXX+ooooo @@@@@@@@@",
"@@@@@@@@ +O+++++++++++++++++++++ooooo @@@@@",
"@@@@@@@ O +OOOOOOOOOOOOOOOOOOOOOOoooo OO++o @@@@",
"@@@@@@ OO +OOOOOOOOOOOOOOOOOOOOOOooo OO++oo @@@@",
"@@@@@ OOO Ooooooooooooooooooooooooo OO++ooo @@@@",
"@@@@ OOOO OO++oooo @@@@",
"@@@ ++++++++++++++++++++++++++++++++++Ooooo @@@@",
"@@@ +++++++++++++++++++++++++++++++++Oooooo @@@@",
"@@@ ++OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoooooo @@@@",
"@@@ ++OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoooooo @@@@",
"@@@ ++OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOooooo @@@@@",
"@@@ ++OOOOOOOOOOOOOOOOOO oOOoooo @@@@@@",
"@@@ OOoooooooooooooooooooooooooooooooooo @@@@@@@",
"@@@ OOooooooooooooooooooooooooooooooooo @@@@@@@@",
"@@@@ @@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
};
const char *const *const main_icon[] = {
main_icon_0,
main_icon_1,
main_icon_2,
};
const int n_main_icon = 3;

150
puttysrc/UNIX/XPMPUCFG.C Normal file
View File

@@ -0,0 +1,150 @@
/* XPM */
static const char *const cfg_icon_0[] = {
/* columns rows colors chars-per-pixel */
"16 16 9 1",
" c black",
". c navy",
"X c blue",
"o c #808000",
"O c yellow",
"+ c #808080",
"@ c #C0C0C0",
"# c gray100",
"$ c None",
/* pixels */
"$$$ $$ $$",
"$$ OO #####@+ $",
"$ $ oO #XX..@+ $",
" o $ oO+X.O.@+ $",
" oO OO .O.X@+ $",
"$ oOOOOoO++@@+ $",
"$$ oooOOoOO +++ ",
"$ # oooOO +++++ ",
"$ #X..ooOO +++ $",
"$ #X.O. oOO $$",
"$ #.O.X@ oOO $$$",
"$ @++@@@+ oOO $$",
"$ ++++++++ oOO $",
" #####++++ oOO ",
" @+++++++ $$ oO ",
"$ $$$$ $"
};
/* XPM */
static const char *const cfg_icon_1[] = {
/* columns rows colors chars-per-pixel */
"32 32 9 1",
" c black",
". c navy",
"X c blue",
"o c #808000",
"O c yellow",
"+ c #808080",
"@ c #C0C0C0",
"# c gray100",
"$ c None",
/* pixels */
"$$$$$$$$$$$$$$$$ $$$$",
"$$$$$$ $$$$$$$ @@@@@@@@@@@+ $$$",
"$$$$$ OO $$$$ ##########@++ $$$",
"$$$$$ ooOO $$$ #.........@++ $$$",
"$$$$$$ ooOO $$ #.XXXXXXXX@++ $$$",
"$$ $$$ oOO $$ #.XXXX XX@++ $$$",
"$ oO $$ oOOO $ #.XXX O XX@++ $$$",
"$ oOO oOOOO $ #.X O XXX@++ $$$",
"$$ oOOOOOOO $$ #. OO XXXX@++ $$$",
"$$ ooOOOOOOO $ # OO XXXXX@++ $$$",
"$$$ ooooooOOO OO ######@++ $",
"$$$$ oo ooOOO OO +++++++++ @#+ ",
"$$$$$$ $ ooOOO @#++ ",
"$$$$$$$$$$ ooOOO OOOO ######@++ ",
"$$$$$ O ooOOO O @@@@@@@+++ ",
"$$$$ @@@@@ ooOOO @@+ +@++ $",
"$$$ ######### ooOOO +++++++++ $$",
"$$$ #....... O ooOOO $$$",
"$$$ #.XXXXX OO ooOOO $$$$$$$$$$",
"$$$ #.XXXX OO @+ ooOOO $$$$$$$$$",
"$$$ #.XXX O X@++ ooOOO $$$$$$$$",
"$$$ #.XX O XXX@++ ooOOO $$$$$$$",
"$$$ #.XX XXXX@++ $ ooOOO $$$$$$",
"$$$ #.XXXXXXXX@++ $$ ooOOO $$$$$",
"$$$ ##########@++ $ ooOOO $$$$",
"$$ @+++++++++++ @#+ $ ooOOO $$$",
"$ @ @#++ $$ ooOOO $$",
" ################@++ $$$ ooO $$$",
" #@@@@@@@@@@@@@@@+++ $$$$ o $$$$",
" #@@@@@@@@+ +@++ $$$$$$ $$$$$",
" @++++++++++++++++ $$$$$$$$$$$$$",
"$ $$$$$$$$$$$$$$"
};
/* XPM */
static const char *const cfg_icon_2[] = {
/* columns rows colors chars-per-pixel */
"48 48 9 1",
" c black",
". c navy",
"X c blue",
"o c #808000",
"O c yellow",
"+ c #808080",
"@ c #C0C0C0",
"# c gray100",
"$ c None",
/* pixels */
"$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$ @@@@@@@@@@@@@@@@@+ $$$$",
"$$$$$$$$$ $$$$$$$$$$$$ @@@@@@@@@@@@@@@@@++ $$$$",
"$$$$$$$$ OO $$$$$$$$ ################@+++ $$$$",
"$$$$$$$$ oOOOO $$$$$$$ #++++++++++++++@++++ $$$$",
"$$$$$$$$$ ooOOO $$$$$$ #+.............#++++ $$$$",
"$$$$$$$$$$ ooOOO $$$$$ #+.XXXXXXXXXXXX#++++ $$$$",
"$$$$$$$$$$$ oOOO $$$$$ #+.XXXXXXXXXXXX#++++ $$$$",
"$$$ $$$$$$ oOOO $$$$$ #+.XXXXXXX XXX#++++ $$$$",
"$$ oO $$$$$ oOOOO $$$$ #+.XXXXXX O XXX#++++ $$$$",
"$$ ooO $$$$ oOOOO $$$$ #+.XXXXX O XXXX#++++ $$$$",
"$$$ oOO OOOOO $$$$$ #+.XXX O XXXXX#++++ $$$$",
"$$$ ooOOOOOOOOOOO $$$$ #+.XX OO XXXXXX#++++ $$$$",
"$$$ ooOOOOOOOOOOOO $$$ #+.X OO XXXXXXX#++++ $$$$",
"$$$$ oooOOOOoOOOOOO $$ #@ OO #########++++ $",
"$$$$$ oooooooOOOOOOO # OOO @@@@@@@@@@+++ @##+ ",
"$$$$$$ oo ooOOOOOOO OO +++++++++++++ @##++ ",
"$$$$$$$$$ $ ooOOOOOOO OO @##+++ ",
"$$$$$$$$$$$$$ ooOOOOOOO ############@+++ ",
"$$$$$$$$$$$$$$ ooOOOOOOO OOOOOO ##########@++++ ",
"$$$$$$$$$$$$$$$ ooOOOOOOO OOO @@+ @++++ $",
"$$$$$$$$$$$$$$$$ ooOOOOOOO O ++++++++++++++++ $$",
"$$$$$$$$$$$$$$$ O ooOOOOOOO ++++++++++++++++ $$$",
"$$$$$$$$$$$$$$$$ ooOOOOOOO $$$$",
"$$$$$$$ ooOOOOOOO $$$$$$$$$$$$$$$$$$",
"$$$$$$ @@@@@@@@@@@@ ooOOOOOOO $$$$$$$$$$$$$$$$$",
"$$$$$ @@@@@@@@@@@@ OO ooOOOOOOO $$$$$$$$$$$$$$$$",
"$$$$ ############ OO ooOOOOOOO $$$$$$$$$$$$$$$",
"$$$$ #++++++++++ OO @++ ooOOOOOOO $$$$$$$$$$$$$$",
"$$$$ #+........ OO .#+++ ooOOOOOOO $$$$$$$$$$$$$",
"$$$$ #+.XXXXXX O XX#++++ ooOOOOOOO $$$$$$$$$$$$",
"$$$$ #+.XXXXX O XXXX#++++ ooOOOOOOO $$$$$$$$$$$",
"$$$$ #+.XXXX O XXXXX#++++ $ ooOOOOOOO $$$$$$$$$$",
"$$$$ #+.XXXX XXXXXX#++++ $$ ooOOOOOOO $$$$$$$$$",
"$$$$ #+.XXXXXXXXXXXX#++++ $$$ ooOOOOOOO $$$$$$$$",
"$$$$ #+.XXXXXXXXXXXX#++++ $$$$ ooOOOOOOO $$$$$$$",
"$$$$ #+.XXXXXXXXXXXX#++++ $$$$$ ooOOOOOOO $$$$$$",
"$$$$ #+.XXXXXXXXXXXX#++++ $$$$$$ ooOOOOOOO $$$$$",
"$$$$ #@##############++++ $$$$ ooOOOOOOO $$$$",
"$$$ #@@@@@@@@@@@@@@@+++ @##+ $$$$ ooOOOOOOO $$$",
"$$ @ @+++++++++++++++++ @##++ $$$$$ ooOOOOO $$$$",
"$ @@ @##+++ $$$$$$ ooOOO $$$$$",
" ########################@+++ $$$$$$$ ooO $$$$$$",
" #######################@++++ $$$$$$$$ o $$$$$$$",
" ##@@@@@@@@@@@@+ @++++ $$$$$$$$$$ $$$$$$$$",
" @@++++++++++++++++++++++++ $$$$$$$$$$$$$$$$$$$$",
" @@+++++++++++++++++++++++ $$$$$$$$$$$$$$$$$$$$$",
"$ $$$$$$$$$$$$$$$$$$$$$$"
};
const char *const *const cfg_icon[] = {
cfg_icon_0,
cfg_icon_1,
cfg_icon_2,
};
const int n_cfg_icon = 3;

147
puttysrc/UNIX/XPMPUTTY.C Normal file
View File

@@ -0,0 +1,147 @@
/* XPM */
static const char *const main_icon_0[] = {
/* columns rows colors chars-per-pixel */
"16 16 8 1",
" c black",
". c navy",
"X c blue",
"o c yellow",
"O c #808080",
"+ c #C0C0C0",
"@ c gray100",
"# c None",
/* pixels */
"####### ##",
"###### @@@@@+O #",
"###### @XX..+O #",
"###### @X.o.+O #",
"###### O.o.X+O #",
"###### ooOO++O #",
"## ooooo OOO ",
"# @Oooooo OOOOO ",
"# @X..oo OOOO #",
"# @X.o.OO ##",
"# @.o.X+O ######",
"# +OO+++O ######",
"# OOOOOOOO #####",
" @@@@@OOOO #####",
" +OOOOOOO ######",
"# #######"
};
/* XPM */
static const char *const main_icon_1[] = {
/* columns rows colors chars-per-pixel */
"32 32 8 1",
" c black",
". c navy",
"X c blue",
"o c yellow",
"O c #808080",
"+ c #C0C0C0",
"@ c gray100",
"# c None",
/* pixels */
"################ ####",
"############### +++++++++++O ###",
"############## @@@@@@@@@@+OO ###",
"############## @.........+OO ###",
"############## @.XXXXXXXX+OO ###",
"############## @.XXXX XX+OO ###",
"############## @.XXX o XX+OO ###",
"############## @.X o XXX+OO ###",
"############## @. oo XXXX+OO ###",
"############## @ oo XXXXX+OO ###",
"############## oo @@@@@@+OO #",
"############# ooo OOOOOOOOO +@O ",
"############ ooo +@OO ",
"########## ooooooooo @@@@@@+OO ",
"##### ooooooooo +++++++OOO ",
"#### +++++ ooo ++O O+OO #",
"### @@@@@@@@@ ooo OOOOOOOOOOO ##",
"### @....... oo ###",
"### @.XXXXX oo OO ##############",
"### @.XXXX oo +OO ##############",
"### @.XXX o X+OO ##############",
"### @.XX o XXX+OO ##############",
"### @.XX XXXX+OO ##############",
"### @.XXXXXXXX+OO ##############",
"### @@@@@@@@@@+OO ############",
"## +OOOOOOOOOOO +@O ###########",
"# + +@OO ###########",
" @@@@@@@@@@@@@@@@+OO ###########",
" @+++++++++++++++OOO ###########",
" @++++++++O O+OO ############",
" +OOOOOOOOOOOOOOOO #############",
"# ##############"
};
/* XPM */
static const char *const main_icon_2[] = {
/* columns rows colors chars-per-pixel */
"48 48 8 1",
" c black",
". c navy",
"X c blue",
"o c yellow",
"O c #808080",
"+ c #C0C0C0",
"@ c gray100",
"# c None",
/* pixels */
"######################### #####",
"######################## +++++++++++++++++O ####",
"####################### +++++++++++++++++OO ####",
"###################### @@@@@@@@@@@@@@@@+OOO ####",
"###################### @OOOOOOOOOOOOOO+OOOO ####",
"###################### @O.............@OOOO ####",
"###################### @O.XXXXXXXXXXXX@OOOO ####",
"###################### @O.XXXXXXXXXXXX@OOOO ####",
"###################### @O.XXXXXXX XXX@OOOO ####",
"###################### @O.XXXXXX o XXX@OOOO ####",
"###################### @O.XXXXX o XXXX@OOOO ####",
"###################### @O.XXX o XXXXX@OOOO ####",
"###################### @O.XX oo XXXXXX@OOOO ####",
"###################### @O.X oo XXXXXXX@OOOO ####",
"###################### @+ oo @@@@@@@@@OOOO #",
"##################### @ ooo ++++++++++OOO +@@O ",
"#################### + oo OOOOOOOOOOOOO +@@OO ",
"################### + oo +@@OOO ",
"################## @ ooo @@@@@@@@@@@@+OOO ",
"################## ooooooooooo @@@@@@@@@@+OOOO ",
"################## oooooooooo ++O +OOOO #",
"################ oooooooooo OOOOOOOOOOOOOOOO ##",
"############### ooooooooooo OOOOOOOOOOOOOOOO ###",
"################ ooo ####",
"####### oo ######################",
"###### ++++++++++++ oo O ######################",
"##### ++++++++++++ ooo OO ######################",
"#### @@@@@@@@@@@@ oo OOO ######################",
"#### @OOOOOOOOOO oo +OOOO ######################",
"#### @O........ oo .@OOOO ######################",
"#### @O.XXXXXX o XX@OOOO ######################",
"#### @O.XXXXX o XXXX@OOOO ######################",
"#### @O.XXXX o XXXXX@OOOO ######################",
"#### @O.XXXX XXXXXX@OOOO ######################",
"#### @O.XXXXXXXXXXXX@OOOO ######################",
"#### @O.XXXXXXXXXXXX@OOOO ######################",
"#### @O.XXXXXXXXXXXX@OOOO ######################",
"#### @O.XXXXXXXXXXXX@OOOO ######################",
"#### @+@@@@@@@@@@@@@@OOOO ###################",
"### @+++++++++++++++OOO +@@O ##################",
"## + +OOOOOOOOOOOOOOOOO +@@OO ##################",
"# ++ +@@OOO ##################",
" @@@@@@@@@@@@@@@@@@@@@@@@+OOO ##################",
" @@@@@@@@@@@@@@@@@@@@@@@+OOOO ##################",
" @@++++++++++++O +OOOO ###################",
" ++OOOOOOOOOOOOOOOOOOOOOOOO ####################",
" ++OOOOOOOOOOOOOOOOOOOOOOO #####################",
"# ######################"
};
const char *const *const main_icon[] = {
main_icon_0,
main_icon_1,
main_icon_2,
};
const int n_main_icon = 3;