Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - André Heldoorn

Pages: [1] 2 3 ... 26
1
Setup & Installation / Re: REGEDIT2 export & import
« on: December 11, 2018, 11:09:54 am »
I would likely use REXX to do it, myself.

How? And to check settings, or to set settings?

The goal will probably almost matches Neil's. I've got two versions of an Acrobat Reader 4, with a few slightly different DLLs. Innotek's embedded one, and a stand-alone one. In this case I'ld like to replace the stand-alone files by Innotek's. So an eCS 1.x install has two identical copies with identical (DLL) files, and a rare OS/2 Warp 4 install or ArcaOS 6 without an Acrobat Reader 4 still has a stand-alone Acrobat Reader 4 with a single copy of those files. So e.g. install scripts can always use that single copy, which is always there, while I don't mind that the conditional embedded copy is the default one. Checking if Innotek's in installed is not the prefered solution. Innotek's version should report its missing settings, AFAICT, so it's not a matter of importing *.* and hope nothing is broken.

2
Programming / Re: Compiling my first WPS application
« on: December 11, 2018, 10:41:32 am »
I'm checking the make manual.

   CFLAGS=-Ti

FTR: in your MAKEFILE there's a line:

   icc.exe -Q -Sp2 -D__IBMC__ -W2 $(CFLAGS) -Gm -Gd -Ge- -G5 -C $<

Which shows that e.g. the set variable CFLAGS is related to a ICC.EXE command line. "ICC /? | MORE" will probably show that /Ti+ includes debug code, so you can use the VAC debugger with this code.

In Rexx,don't check the Rexx manual, the code could have looked like:

/**/
c='HelloWorld.C'
cflags=''
debug=0
IF debug=1 THEN cflags='/Ti+'
'ICC.EXE -Q -Sp2 -D__IBMC__ -W2' cflags '-Gm -Gd -Ge- -G5 -C' c

3
Setup & Installation / REGEDIT2 export & import
« on: December 07, 2018, 01:50:15 am »
Is exporting and importing new settings (actually creating one file, to be imported per new install) safe and simple indeed?

4
Setup & Installation / Re: REQ: full list of OS components
« on: December 07, 2018, 01:27:32 am »
Later, if I remember, I'll get the list of packages on a new install.

WPTOOLS may help to display the content of folders, FWIW. I'm actually using the a.o. \SYS structures for an "eCS FixPak".

A list of packages may be nice-to-have, but not as important. It would be nice to know that e.g. Netscape is still there, for fast local browsing. HTML code is still being aimed at Netscape over here, and there's not a single reason to change that. If we've lost Netscape, then that may be such a reason in the future.

Regarding OS changes I did send a 64x64/128x128 icon test suite to Quito, but an e-mail service provider decided to delete the data. So did I, after sending it, and I didn't compile a new test suite anymore. No 128x128 PNG icons from me yet, because I don't have it and I don't know how it works, and I don't like *.ICO files which are larger than the *.EXE itself. Bad luck... ;-)

5
Programming / Re: Compiling my first WPS application
« on: December 07, 2018, 01:08:39 am »
Only cto3082.zip should be required for Open Class which incorporates the changes from earlier cto3081.zip.

The latest binaries and locale fixes from ftp://service.software.ibm.com/ps/products/visualagecpp/fixes/v30os2/english-us/tempfix/eurofix/eurofix.zip should be more useful. East Asian locale fixes that don't use the Japanese edition are also available: ftp://service.software.ibm.com/ps/products/visualagecpp/fixes/v30os2/english-us/tempfix/localefx/localefx.zip

Thanks, installed. If anything to not bother experts with fixed issues. I was using some old mirror directory.

FTR: with eurofix.zip I had to unlock CPPOM30.DLL first, albeit I didn't use the documented -u option of UNZIP.EXE after repackaging eurofix.zip (to use a more clear and constant root directory as a base directory, instead of having to remember to CD to x:\IBMCPP directory).

6
General Discussion / Re: ES/2 will be renamed e/OS2
« on: December 04, 2018, 01:42:01 pm »
four Ms :-)
Dunno... Looks like "for Microsoft" to me... ;-)

I'm not going to suggest alternatives, even if /2 still suggests the 32 bits of OS/2 and /1 may be its even older 16 bits version. It's your baby, and all we've got is a name.

7
Programming / Re: Compiling my first WPS application
« on: December 04, 2018, 01:31:17 pm »
It's not required but seems to be the easiest way. Simply install the Toolkit and VisualAge C++ (without toolkit parts) + fixes.

Here: WPS backup, VAC++ 3 CD excluding the toolkit, edit LIBPATH before the reboot (IIRC x:\OS2\DLL before x:\IBMCPP\DLL), reboot and WPS backup, install the first 3.08.x updates with documented reboot, an extra reboot before installing the IIRC 5th package, reboot, install the toolkit v4.52 by using eCS CD #2. And install optional packages like the lvm_toolkit_15.zip, drgdrp.zip and nb-fix.zip.

I do tend to install *.*, including the IDE. If it's buggy, then just don't use it. Probably easier than having to install VAC++ if some project or programming book requires it. Typically you won't use it, for one because of the famous steep learning curve.

Last known location of the english-us FixPaks: ftp://service.software.ibm.com/ps/products/visualagecpp/fixes/v30os2/english-us/fixpak8, IIRC you'll need 8 (6, and 3081, and 3082).

8
General Discussion / Re: ES/2 will be renamed e/OS2
« on: December 03, 2018, 07:59:36 pm »
ES\1 and ES\2 work.  How about ES^1 and ES^2.  Exponential increases.

Better than making it look like a combination of eCS and IBM's OS/2, let's say assuming it will be a commercial success somehow.

But I'm not sure "mum" will know what you are talking about, she may not understand the meaning of the ^-smileys, and she may like the fact that you're quite close to "EaSI".

With some keyboard the \ is harder to type than the /, so that is no perfect standard.

Yet another disadvantage is that v2 of e.g. ES^2 doesn't look good. OS/2 Warp was already better than OS/2 4. Unless you are targetting engineers loving and recognizing exponential formulas, obviously. "Mum" ain't no certified engineer... ;)

9
Programming / Re: Rexx -> IBM C
« on: December 03, 2018, 07:49:00 pm »
Same code review request, to not learn anything bad. Again, Rexx ported to C. The code works, and creates a Metastock PRN file after importing individual HTML files.

The business end is in the large for-loop.

Please ignore the error texts, I know I'm reusing the date variable, I'm using DosForceDelete intentionally, and as far as I know the code works, albeit translation may have introduced an error.

Main data formats are &pound;123,45, 123.456 or e.g. $1.2345. Data doesn't have to be checked. I don't know if I have processed Rexx' PARSEs correctly, and it's the first time I've used pointers this way without copying existing code.


Code: [Select]
/* Import.C */

#define INCL_DOSDATETIME
#define INCL_DOSFILEMGR

#include <ctype.h>
#include <io.h>
#include <os2.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define BUFLEN 8192
#define INDEX1 "PSI20\0"
#define MAXRECORDS 768
#define LINELEN 128


typedef struct _RECORDS {char symbol[11];} RECORDS;


int main(void)
{
BOOL found=0;
char *all,sourcename[CCHMAXPATH],day,*data,date[LINELEN],targetname[LINELEN],dummy[2],high[16],low[16],month,open[16],*orgdata,*skipped,prefix[16],line[LINELEN],suffix[16],volume[16];
DATETIME dt;
FILE *source,*target;
RECORDS *records;
ULONG date2,today;
USHORT done=0,i,year,counter=0,counter2,counter3=0;

DosGetDateTime(&dt);
today=dt.year*10000+dt.month*100+dt.day;

if (dt.hours*60+dt.minutes<1105)
   {
   sprintf(sourcename,"%08u.001",today);
   if (!access(sourcename,00))
       {
       printf("\Error\n");
       return 1;
       }
   dt.day--;
   if (!dt.day)
      {
      dt.day=31;
      dt.month--;
      if (!dt.month)
         {
         dt.month=12;
         dt.year--;
         }
      if (dt.month==4||dt.month==6||dt.month==9||dt.month==11)
         dt.day--;
      else if (dt.month==2)
         {
         dt.day=28;
         if (!dt.year%4&&dt.year%100)
            dt.day++;
         }
      }
   today=dt.year*10000+dt.month*100+dt.day;
   sprintf(sourcename,"%08u.001",today);
   if (-1==access(sourcename,00))
       {
       printf("\nError\n");
       return 1;
       }
   }

if (NULL==(records=calloc(MAXRECORDS,sizeof(RECORDS))))
   {
   printf("\nError\n");
   return 1;
   }

sprintf(sourcename,"AANDELEN.LST");
if ((source=fopen(sourcename,"r"))==NULL)
   {
   printf("\nError\n",sourcename);
   free(records);
   return 1;
   }
while (NULL!=fgets(line,LINELEN,source))
   {
   sscanf(line,"%10c",records[0].symbol);
   records[0].symbol[10]=0;
   while (strlen(records[0].symbol)&&isblank(records[0].symbol[strlen(records[0].symbol)-1]))
      records[0].symbol[strlen(records[0].symbol)-1]=0;
   if (strlen(records[0].symbol))
      strcpy(records[++counter].symbol,records[0].symbol);
   }
fclose(source);

if (!counter)
   {
   printf("\nError\n",sourcename);
   free(records);
   return 1;
   }
for (i=1;i<=counter;i++)
   if (!strcmp(records[i].symbol,INDEX1))
      {
      found=1;
      i=counter;
      }
if (!found)
   {
   printf("\nError\n",INDEX1,sourcename);
   free(records);
   return 1;
   }

strcpy(sourcename,INDEX1);
if (-1==access(sourcename,00))
   {
   printf("\nError\n",sourcename);
   free(records);
   return 1;
   }

if (NULL==(skipped=calloc(BUFLEN,sizeof(char))))
   {
   printf("\nError\n");
   free(records);
   return 1;
   }
if (NULL==(all=calloc(BUFLEN,sizeof(char))))
   {
   printf("\nError\n");
   free(records);
   free(skipped);
   return 1;
   }
if (NULL==(data=calloc(BUFLEN,sizeof(char))))
   {
   printf("\nError\n");
   free(all);
   free(records);
   free(skipped);
   return 1;
   }
orgdata=data;

sprintf(targetname,"%04u.PRN",dt.year);
if (-1==access(targetname,00))
   found=0;
if ((target=fopen(targetname,"a"))==NULL)
   {
   printf("\nError\n",targetname);
   free(all);
   free(data);
   free(records);
   free(skipped);
   return 1;
   }
if (!found)
   {
   fprintf(target,"<TICKER>,<PER>,<DTYYYYMMDD>,<OPEN>,<HIGH>,<LOW>,<CLOSE>,<VOL>,<OI>\n");
   printf("\nFile %s created.\n\n",targetname);
   }

for (i=1;i<=counter;i++)
   {
   if ((source=fopen(records[i].symbol,"rb"))==NULL)
      {
      printf("\nError\n");
      fclose(target);
      free(all);
      free(data);
      free(records);
      free(skipped);
      return 1;
      }
   fread(all,sizeof(char),BUFLEN,source);
   fclose(source);
   sprintf(date,"id=\"datetimeLastvalue\">\0");
   data=strstr(all,date);
   data+=strlen(date);
   day=(*data-'0')*10;
   data++;
   day+=*data-'0';
   data+=2;
   month=(*data-'0')*10;
   data++;   
   month+=*data-'0';
   data+=2;
   year=(*data-'0')*1000;
   data++;   
   year+=(*data-'0')*100;
   data++;   
   year+=(*data-'0')*10;
   data++;   
   year+=*data-'0';
   date2=year*10000+month*100+day;   
   if (date2!=today)   
      printf("No data found: %s\n",records[i].symbol);
   else
      {
      sprintf(date,"id=\"lastPriceint\">\0");
      if (NULL!=(data=strstr(all,date)))
         {
         data+=strlen(date);
         counter2=0;
         while (isdigit(*data))
            {
            prefix[counter2++]=*data;         
            *data++;
            }
         prefix[counter2]=0;
         counter2=0;
         sprintf(date,"id=\"lastPricefract\">\0");
         data=strstr(all,date);
         data+=strlen(date);
         while (isdigit(*data))
            {
            suffix[counter2++]=*data;         
            *data++;
            }
         suffix[counter2]=0;
         counter2=0;
         sprintf(date,"id=\"todayVolumevalue\">\0");
         if (NULL!=(data=strstr(all,date)))
            {
            data+=strlen(date);
            while (isdigit(*data)||*data=='.')
               {
               if (isdigit(*data))
                  volume[counter2++]=*data;
               *data++;
               }
            volume[counter2]=0;
            }
         else
            strcpy(volume,"0\0");
         counter2=0;         
         sprintf(date,">Open<\0");
         data=strstr(all,date);                 
         data+=strlen(date);
         sprintf(date,">\0");
         data=strstr(data,date);                 
         data+=strlen(date);
         data=strstr(data,date);                 
         data+=strlen(date);
         if (*data=='$')
            data++;
         else if (*data=='&')
            {
            sprintf(date,";\0");
            data=strstr(data,date);                 
            data+=strlen(date);
            }
         while (isdigit(*data)||*data=='.'||*data==',')
            {
            if (isdigit(*data))
               open[counter2++]=*data;
            else if (*data==',')
               open[counter2++]='.';
            *data++;
            }
         open[counter2]=0;
         counter2=0;         
         sprintf(date,"id=\"highPricevalue\">\0");
         data=strstr(all,date);                 
         data+=strlen(date);
         while (isdigit(*data)||*data=='.'||*data==',')
            {
            if (isdigit(*data))
               high[counter2++]=*data;
            else if (*data==',')
               high[counter2++]='.';
            *data++;
            }
         high[counter2]=0;
         counter2=0;         
         sprintf(date,"id=\"lowPricevalue\">\0");
         data=strstr(all,date);                 
         data+=strlen(date);
         while (isdigit(*data)||*data=='.'||*data==',')
            {
            if (isdigit(*data))
               low[counter2++]=*data;
            else if (*data==',')
               low[counter2++]='.';
            *data++;
            }
         low[counter2]=0;
         if (strlen(prefix)&&strlen(suffix))
            {
            done++;
            fprintf(target,"%s,D,%8u,%s,%s,%s,%s.%s,%s\n",records[i].symbol,date2,open,high,low,prefix,suffix,volume);
            }
         else
            {
            counter3++;
            if (!strlen(skipped))
               strcpy(skipped,records[i].symbol);
            else
               {
               strcat(skipped," \0");
               strcat(skipped,records[i].symbol);
               }
            }
         }
      else
         {
         counter3++;
         if (!strlen(skipped))
            strcpy(skipped,records[i].symbol);
         else
            {
            strcat(skipped," \0");
            strcat(skipped,records[i].symbol);
            }
         }
      }
   DosForceDelete(records[i].symbol);
   }

fclose(target);
free(all);
free(orgdata);
free(records);
free(skipped);

printf("Import: %u\n",done);
if (strlen(skipped))
   printf("Skipped: %s (%u)\n",skipped,counter3);

return 0;
}


10
Setup & Installation / Re: REQ: full list of OS components
« on: December 03, 2018, 04:03:33 pm »
Quote
\OS2\DLL\SHIELD.DLl

Classic OS/2 typo, which still exists... :)

11
Setup & Installation / Re: Setup strings with PARSEDB and DATABASE.DAT
« on: December 03, 2018, 03:59:36 pm »
As you point out, using the application file name as the index into the database can cause some unwanted settings when you have two different programs with the same file name that require different settings.
That may be a type of overengineering. I guess you can write a rather simple database app which has recorded settings in the usual WPS setup string format, and - if you really want that - which queries settings of existing objectsand repairs broken ones.

Presumably a real new setting, a WPS setup string with "SET FOO=BAR" was already supported but not visible, comes with an own new setup string. E.g. "SCHEDULED=20121231235959".

My database is Rexx-shaped, because e.g. inserting a "SET FOO=BAR" or "ICONFILE=..." is easier that having to create and/or use some DATABASE.TXT format with exactly the same setting. I do still use DATABASE.TXT for a few Win-OS/2 apps, like MS Office's (not really motivated to find out differences compared to defaults and DATABASE.TXT).

I wouldn't mind having a customized/personalized or improved/modernized DATABASE.TXT, but an own Rexx script which contains both the data (SET FOO=BAR) and the data processing (a.o. SysCreateObject) is more efficient.

I could create records, like a customized record #1 with SET FOO=BAR and ICONFILE=... in a text field.

FWIW, ivan may be listening: the Rexx code is easy if you know the environment. Typically just lines with SysCreateObject, SysCreateShadow, SsSetObjectData or SysIni. Almost a configuration file instead of a computer program.

12
Web applications / Re: Firefox ESR 38.8.0
« on: November 21, 2018, 12:51:42 pm »
What is the browser identification string of the matching version of SeaMonkey?

In scripts I can use any latest Windows string to associate bandwidth abuse with those people, but I do prefer to use an older OS/2 string to promote awareness of, and support for, older browsers and OSes. So their statitics don't show that 99.9% of their visitors is using Windows and 64-bit Java. FF38, even available for Pentium II OS/2 CPUs, seems to be a good new bottom line by now.

13
General Discussion / Re: ES/2 will be renamed e/OS2
« on: November 21, 2018, 12:44:14 pm »
e/OS2

Including legal matters, this may not be the best choice. For example because another combination of the /, O, S and 2 is known as an old 32-bit OS, and the e & S with an inserted C didn't really change that. As if e/OS1 is the 16-bit version of Microsoft OS/2 1.0. With Gopher, because of the e.

14
Setup & Installation / Re: Setup strings with PARSEDB and DATABASE.DAT
« on: November 21, 2018, 12:39:03 pm »
Has anyone messed around with PARSEDB and DATABASE.DAT and created new tags to add settings to DATABASE.DAT that worked?

Typically creating an own INST-ALL.CMD Rexx app will be more efficient than creating DATABASE.TXT entries, for one because DATABASE.TXT works better with unique files names. If you are going to append an INTERRUPT_DURING_IO to a customized DATABASE.TXT file, then you may as well insert INTERRUPT_DURING_IO in your own file. Without file format restrictions.

In theory you can use WPTOOLS.DLL to create setup files based on actually installed apps. Please note that both WPTOOLS.DLL and DATABASE.X may nowadays set a setting to its default value, like an useless PROGTYPE=PM for the first E.EXE or VIEW.EXE found in your PATH.

I'm not familiar with PARSEDB, but WPTOOLS.DLL to query existing settings may be easier. Nevertheless I wouldn't mind a generic DATABASE.TXT update, to e.g. exclude outdated versions and to include more modern apps.

15
Programming / Re: x:\SYS\ICONS\BIGICONS\*.PNG
« on: November 21, 2018, 12:24:57 pm »
A WHATSNEW.TXT for developers may help... ???

eCS: embedded HELLO.EXE icon, HELLO.ICO, or the WPS setup string ICONFILE=GOODBYE.ICO to assign any valid icon.
AOS: ?

Pages: [1] 2 3 ... 26