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 >
C/C++ Source or Header  |  1994-04-19  |  2KB  |  80 lines

  1. /* prefs.c -- Inherited attributes in buffers and windows
  2.    Copyright (C) 1993, 1994 John Harper <jsh@ukc.ac.uk>
  3.  
  4. This file is part of Jade.
  5.  
  6. Jade is free software; you can redistribute it and/or modify it
  7. under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2, or (at your option)
  9. any later version.
  10.  
  11. Jade is distributed in the hope that it will be useful, but
  12. WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with Jade; see the file COPYING.    If not, write to
  18. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. #include "jade.h"
  21. #include "jade_protos.h"
  22.  
  23. #include <string.h>
  24.  
  25. _PR void copywinprefs(VW *, VW *);
  26. _PR void copyfileprefs(TX *, TX *);
  27.  
  28. _PR short DefDims[4];
  29. short DefDims[4] = { 0, 0, 80, 24 };
  30.  
  31. void
  32. copywinprefs(VW *dest, VW *src)
  33. {
  34.     if(src)
  35.     {
  36.     dest->vw_MaxScroll = src->vw_MaxScroll;
  37.     dest->vw_XStepRatio = src->vw_XStepRatio;
  38.     dest->vw_YStepRatio = src->vw_YStepRatio;
  39.     dest->vw_Flags = src->vw_Flags;
  40.     dest->vw_FontName = src->vw_FontName;
  41. #ifdef HAVE_AMIGA
  42.     dest->vw_WindowSys.ws_FontSize = src->vw_WindowSys.ws_FontSize;
  43.     dest->vw_WindowSys.ws_ScreenName = src->vw_WindowSys.ws_ScreenName;
  44. #endif
  45.     }
  46.     else
  47.     {
  48.     dest->vw_MaxScroll = 20;
  49.     dest->vw_XStepRatio = 4;
  50. #ifdef HAVE_AMIGA
  51.     dest->vw_YStepRatio = 0;
  52. #else
  53.     dest->vw_YStepRatio = 4;
  54. #endif
  55.     dest->vw_Flags = 0;
  56.     dest->vw_FontName = DefFontStr;
  57. #ifdef HAVE_AMIGA
  58.     dest->vw_WindowSys.ws_FontSize = DefFontSize;
  59.     dest->vw_WindowSys.ws_ScreenName = DefPubScreen;
  60. #endif
  61.     }
  62. }
  63.  
  64. void
  65. copyfileprefs(TX *dest, TX *src)
  66. {
  67.     if(src)
  68.     {
  69.     dest->tx_TabSize = 8;
  70.     dest->tx_DiskTab = src->tx_DiskTab;
  71.     dest->tx_SaveTabs = src->tx_SaveTabs;
  72.     }
  73.     else
  74.     {
  75.     dest->tx_TabSize = 8;
  76.     dest->tx_DiskTab = 8;
  77.     dest->tx_SaveTabs = 2;
  78.     }
  79. }
  80.