home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 4
/
FreshFish_May-June1994.bin
/
bbs
/
may94
/
util
/
edit
/
jade.lha
/
Jade
/
src
/
prefs.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-04-19
|
2KB
|
80 lines
/* prefs.c -- Inherited attributes in buffers and windows
Copyright (C) 1993, 1994 John Harper <jsh@ukc.ac.uk>
This file is part of Jade.
Jade is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
Jade is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Jade; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "jade.h"
#include "jade_protos.h"
#include <string.h>
_PR void copywinprefs(VW *, VW *);
_PR void copyfileprefs(TX *, TX *);
_PR short DefDims[4];
short DefDims[4] = { 0, 0, 80, 24 };
void
copywinprefs(VW *dest, VW *src)
{
if(src)
{
dest->vw_MaxScroll = src->vw_MaxScroll;
dest->vw_XStepRatio = src->vw_XStepRatio;
dest->vw_YStepRatio = src->vw_YStepRatio;
dest->vw_Flags = src->vw_Flags;
dest->vw_FontName = src->vw_FontName;
#ifdef HAVE_AMIGA
dest->vw_WindowSys.ws_FontSize = src->vw_WindowSys.ws_FontSize;
dest->vw_WindowSys.ws_ScreenName = src->vw_WindowSys.ws_ScreenName;
#endif
}
else
{
dest->vw_MaxScroll = 20;
dest->vw_XStepRatio = 4;
#ifdef HAVE_AMIGA
dest->vw_YStepRatio = 0;
#else
dest->vw_YStepRatio = 4;
#endif
dest->vw_Flags = 0;
dest->vw_FontName = DefFontStr;
#ifdef HAVE_AMIGA
dest->vw_WindowSys.ws_FontSize = DefFontSize;
dest->vw_WindowSys.ws_ScreenName = DefPubScreen;
#endif
}
}
void
copyfileprefs(TX *dest, TX *src)
{
if(src)
{
dest->tx_TabSize = 8;
dest->tx_DiskTab = src->tx_DiskTab;
dest->tx_SaveTabs = src->tx_SaveTabs;
}
else
{
dest->tx_TabSize = 8;
dest->tx_DiskTab = 8;
dest->tx_SaveTabs = 2;
}
}