home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Exec 3 / CD_Magazyn_EXEC_nr_3.iso / Internet / Strony_WWW / Opus4.x / DOpus414JRsrc.lha / DirectoryOpus4 / Program / about.c next >
C/C++ Source or Header  |  2000-04-01  |  6KB  |  178 lines

  1. /*
  2.  
  3. Directory Opus 4
  4. Original GPL release version 4.12
  5. Copyright 1993-2000 Jonathan Potter
  6.  
  7. This program is free software; you can redistribute it and/or
  8. modify it under the terms of the GNU General Public License
  9. as published by the Free Software Foundation; either version 2
  10. of the License, or (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20.  
  21. All users of Directory Opus 4 (including versions distributed
  22. under the GPL) are entitled to upgrade to the latest version of
  23. Directory Opus version 5 at a reduced price. Please see
  24. http://www.gpsoft.com.au for more information.
  25.  
  26. The release of Directory Opus 4 under the GPL in NO WAY affects
  27. the existing commercial status of Directory Opus 5.
  28.  
  29. */
  30.  
  31. #include "dopus.h"
  32.  
  33. char *version="$VER: Directory Opus 4.14 (" __DATE__ ")";
  34.  
  35. void about()
  36. {
  37.     simplerequest(
  38.         "Directory Opus 4.14\n"
  39.         "Based on GPL release version 4.12\n"
  40.         "modified by Jacek Rzeuski\n"
  41.         "Copyright 1993-2000 Jonathan Potter\n"
  42.         "\n"
  43.         "This program is free software; you can redistribute it and/or\n"
  44.         "modify it under the terms of the GNU General Public License\n"
  45.         "as published by the Free Software Foundation; either version 2\n"
  46.         "of the License, or (at your option) any later version.\n"
  47.         "\n"
  48.         "This program is distributed in the hope that it will be useful,\n"
  49.         "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
  50.         "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
  51.         "GNU General Public License for more details.\n"
  52.         "\n"
  53.         "All users of Directory Opus 4 (including versions distributed\n"
  54.         "under the GPL) are entitled to upgrade to the latest version of\n"
  55.         "Directory Opus version 5 at a reduced price. Please see\n"
  56.         "http://www.gpsoft.com.au for more information.",
  57.         globstring[STR_CONTINUE],NULL);
  58. }
  59.  
  60.  
  61. char *comp_date=__DATE__,*comp_time=__TIME__;
  62.  
  63. void give_version_info()
  64. {
  65.     char buf[700];
  66.     char
  67.         prog_ver_buf[20],
  68.         lib_ver_buf[20],
  69.         kick_ver_buf[20],
  70.         wb_ver_buf[20],
  71.         proc_buf[10],
  72.         coproc_buf[10],
  73.         gfx_buf[10];
  74.     UWORD ver,rev;
  75.     int proc;
  76.  
  77.     lsprintf(prog_ver_buf,"v%s",str_version_string);
  78.     lsprintf(lib_ver_buf,"v%ld.%ld",
  79.         DOpusBase->LibNode.lib_Version,DOpusBase->LibNode.lib_Revision);
  80.  
  81.     if (DOSBase->dl_lib.lib_Version<36 ||
  82.         (GetVar("Kickstart",&kick_ver_buf[1],19,GVF_GLOBAL_ONLY))<1) {
  83.  
  84.         char *ptr3;
  85.         ULONG ptr,*ptr2;
  86.         
  87.         ptr2=(ULONG *)0xffffec;
  88.         ptr=0x1000000-(*ptr2);
  89.         ptr3=(char *)ptr+12;
  90.         ptr2=(ULONG *)ptr3;
  91.         ptr=*ptr2;
  92.  
  93.         ver=ptr>>16;
  94.         rev=ptr&0xFFFF/*(((1<<32)-(1<<16))-1)*/;
  95.  
  96.         lsprintf(kick_ver_buf,"v%ld.%ld",ver,rev);
  97.     }
  98.     else kick_ver_buf[0]='v';
  99.  
  100.     if (DOSBase->dl_lib.lib_Version<36 ||
  101.         (GetVar("Workbench",&wb_ver_buf[1],19,GVF_GLOBAL_ONLY))<1) {
  102.  
  103.         struct Library *VersionBase;
  104.  
  105.         if (VersionBase=OpenLibrary("version.library",0)) {
  106.             ver=VersionBase->lib_Version;
  107.             rev=VersionBase->lib_Revision;
  108.             CloseLibrary(VersionBase);
  109.         }
  110.         else ver=rev=0;
  111.  
  112.         lsprintf(wb_ver_buf,"v%ld.%ld",ver,rev);
  113.     }
  114.     else wb_ver_buf[0]='v';
  115.  
  116.     if (SysBase->AttnFlags&AFF_68010) {
  117.         if (SysBase->AttnFlags&AFF_68020) {
  118.             if (SysBase->AttnFlags&AFF_68030) {
  119.                 if (SysBase->AttnFlags&AFF_68040) {
  120.                     if (SysBase->AttnFlags&AFF_68060) {
  121.                         proc=60;
  122.                     }
  123.                     else proc=40;
  124.                 }
  125.                 else proc=30;
  126.             }
  127.             else proc=20;
  128.         }
  129.         else proc=10;
  130.     }
  131.     else proc=0;
  132.  
  133.     lsprintf(proc_buf,"680%02ld",proc);
  134.  
  135.     if (SysBase->AttnFlags&AFF_68040 && SysBase->AttnFlags&AFF_FPU40) {
  136.         strcpy(coproc_buf,"68040 FPU");
  137.     }
  138.     else if (SysBase->AttnFlags&AFF_68881) {
  139.         if (SysBase->AttnFlags&AFF_68882) {
  140.             strcpy(coproc_buf,"68882");
  141.         }
  142.         else strcpy(coproc_buf,"68881");
  143.     }
  144.     else strcpy(coproc_buf,"None");
  145.  
  146.     if (FindName(&SysBase->LibList,"rtg.library")) strcpy(gfx_buf,"P96");
  147.     else if (FindName(&SysBase->LibList,"cybergraphics.library")) strcpy(gfx_buf,"CGX");
  148.     else strcpy(gfx_buf,(scrdata_is_pal)?"PAL":"NTSC");
  149.  
  150.     lsprintf(buf,
  151.         "%-42s\n\n"
  152.         "  Directory Opus%24s  \n"
  153.         "  DOpus Library%25s  \n\n"
  154.         "  Compile time%26s  \n"
  155.         "  Compile date%26s  \n\n"
  156.         "  Port/screen name%22s  \n\n"
  157.         "  Kickstart%29s  \n"
  158.         "  Workbench%29s  \n\n"
  159.         "  Processor%29s  \n"
  160.         "  Math co-processor%21s  \n"
  161.         "  Graphics chipset%22s  \n"
  162.         "  Video system%26s  ",
  163.         "Version information...",
  164.         prog_ver_buf,
  165.         lib_ver_buf,
  166.         comp_time,comp_date,
  167.         str_arexx_portname,
  168.         kick_ver_buf,
  169.         wb_ver_buf,
  170.         proc_buf,
  171.         coproc_buf,
  172.         (GfxBase->ChipRevBits0&GFXF_AA_ALICE)?"AGA":
  173.             ((GfxBase->ChipRevBits0&GFXF_HR_AGNUS)?"ECS":"OLD"),
  174.         gfx_buf);
  175.  
  176.     simplerequest(buf,globstring[STR_CONTINUE],NULL);
  177. }
  178.