HDTenEightyP/NetNews huggingface dataset:
From: rcain@netcom.com (Robert Cain)
Subject: Re: How to bet $100,000 on OS/2 and lose it.
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Fri, 8 Jan 1993 05:50:48 GMT

I must be fair.  My disaster was the fault of one incompetent person
who was subsequently "retired."  There was nothing that IBM as a company
could do to right that error.  I was not planning on telling my story
because I've been around long enough to know that "shit happens" but
when I was awakened at 8:00 this morning to the call telling me they
were picking up the loaner I flipped my wig.  I had deluded myself into
thinking that perhaps I would be left with that system as some kind
of minimal compensation when in fact no such compensation was contracted
or to be realistically expected.  I simply cannot applogize however.

Peace,

Bob
-- 
Bob Cain    rcain@netcom.com   408-358-2007

    'The meek shall inherit the earth--the rest of us will move on..'
                                                    Sameer Parekh


               PGP 1.0 or 2.0 public key available on request.
Newsgroups: comp.os.os2.programmer
From: soh3@quads.uchicago.edu (min-woong sohn)
Subject: Re: emx .8f broke make 3.62
Reply-To: soh3@midway.uchicago.edu
Organization: Dept. of Sociology, Univ. of Chicago
Date: Tue, 5 Jan 1993 23:22:36 GMT

In article <1993Jan5.192219.9159@wam.umd.edu> jdowdal@wam.umd.edu (John Dowdal) writes:
>
>I installed the new version of emx last night (.8f) and it appears that
>GNU make 3.62 has died.  I looked in make.exe and discovered it was compiled
>with emx .8b, so the new .DLL's are probably incompatible with the old
>compiler.  Murphy's law got me because I tested all of the commands except
>make (doing 1 line compiles entered from the command line) and of course
>make had to break.
>
>Put simply, I need a make that is compatible with the new emx.  I cannot
>build make from the sources myself because I need make to make make (arghhh!)
>

You can try dmake.exe or nmake.exe.  They both work fine.  So you can
use any of these two to compile GNU make.  

Min



Newsgroups: comp.os.os2.programmer,comp.graphics,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer
From: jas37876@uxa.cso.uiuc.edu (John A. Slagel)
Subject: Re: Fixed point sqrt anyone?
Organization: University of Illinois at Urbana
Date: Wed, 6 Jan 1993 20:52:06 GMT

   
     Here is how I do it.  This is in Microsoft C inline assembler.  This
     just keeps iterating till it finds the root within 1 digit.
      If you want more speed, change the '2' to something higher, but that
      will decrease accuracy.  This is fast!


#include <stdio.h>

int int_sqrt( int c )
{
	_asm {
	mov     cx, 1
	mov     bx, c
	jmp     skip_iterate

iterate:
	mov     ax, cx
	sub     ax, bx   ; AX = x - y
	cwd
	xor     ax, dx
	sub     ax, dx  ; AX = abs( AX )
	cmp     ax, 2   ; 2 is the allowed error * 2, so we're getting within 1.
	jl      done    ; if abs(x-y) > 2 then goto done
skip_iterate:
	mov     ax, cx
	add     ax, bx
	shr     ax, 1
	mov     cx, ax   ; x = (x+y)/2
	cwd
	mov     ax, c
	idiv    cx
	mov     bx, ax   ; y = c / x
	jmp     iterate

done:
	mov     ax, cx
	add     ax, bx
	shr     ax, 1
	mov     c, ax
	}
	return c;
}


main()
{
	int i=32000, j, k;
	printf( "%d \n", int_sqrt( i ) );
	return 0;
}


-- 
-----------------------------------------------------------------------------
 John A. Slagel              "My old man used to tell me, before he left this
 j-slagel1@uiuc.edu           shitty world, never chase buses or women- you
 (217) 337-7930               always get left behind." -The Marlboro Man
Newsgroups: comp.os.os2.programmer
From: stewarta@netcom.com (Alex Stewart)
Subject: Re: malloc() and swapper.dat problems ....
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
X-Newsreader: Tin 1.1 PL5
Date: Mon, 11 Jan 1993 09:09:48 GMT

Takis Skagos (skagos@mercury.cs.uregina.ca) wrote:
: ---source code---
: 
: #include <stdio.h>
: 
: main()
: {
:   int k = 0;
:   int *p;
    ^^^ <-- (depends on the compiler, but at _least_ two bytes (I suspect 4 in
             this case))

:   setbuf(stdout,NULL); setbuf(stdin,NULL);
:   p = (int *) malloc(12000000);  /* bytes */
:   printf("\n malloced 12000000 bytes.");
:   while(k <           10000000 )
                        ^^^^^^^^ <-- (10000000*4 bytes = 40000000 > 12000000)

:   {
:     p[k] = 1;
:     k++;
:     if(k % 10000 == 0)
:       putchar('.');
:   }
:   free(p);
:   printf("\n freed 12000000 bytes.\n");
: }

Counting your dots, it looks like it got to about k=3000000.  Multiply that by
4 (the size of an int), and you get 12000000, or exactly the size of your 
malloc.  Try making p into a char*.

-alex
-- 
-----------------------------------------------------------------------------
Alex Stewart:         Sysop of YBBS (510) 689-8952 |   This space for rent.
stewarta@netcom.com   .----------------------------'-------------------------
stewarta@carleton.edu | Somebody, somewhere, is offended by what I am saying.
-----------------------------------------------------------------------------
Newsgroups: comp.os.os2.programmer
Subject: Missing structs & defines in headers
From: hamish@terra.cs.waikato.ac.nz (Hamish Marson)
Date: 7 Jan 1993 17:03:06 +1300
Distribution: world
Organization: Comp Sci, U of Waikato, New Zealand
NNTP-Posting-Host: terra.cs.waikato.ac.nz


I'm attempting to make something out of the Presentation Driver Display mess, 
and have the extra files from the beta 32-bit GRE for the toolkit, but I
can't find such goodies as SCREENRESOLUTION, and DSP_RESOLUTION_OBTAINABLE
etc. Can some kind soul point me in the right direction, or tell me how to get
hold of the SVGA DAK that has been mentioned on Compu$erve recently.

TIA.



-- 
|  Hamish Marson.                  | INTERNET h.marson@waikato.ac.nz |
|  University of Waikato           | PHONE    +64 7 8562889 xt 8181  |
|  New Zealand                     | FAX      +64 7 8384066          |
===========Disclaimer :- Remember. You heard it here first.===========
From: dic5340@hertz.njit.edu (David Charlap)
Newsgroups: comp.os.os2.programmer
Subject: Re: malloc() and swapper.dat problems ....
Date: 11 Jan 93 23:07:43 GMT
Organization: New Jersey Institute of Technology, Newark, N.J.

In article <1993Jan11.202609.3711@gandalf.UMCS.Maine.EDU> jurlwin@gandalf.UMCS.Maine.EDU (Jeff Urlwin) writes:
>Yes, it will.  Basically, you are not "malloc"ing enough space to skip
>through 10 million integers.  You should really try:
>
>p = malloc(10000000 * sizeof(int));
>if (p == NULL)
>{
>  fprintf(stderr, "Malloc failed to allocate space...\n");
>  exit(1);
>}

Actually, although this should work, you should use calloc() to
allocate an array of storage.  Instad, use:

p = calloc(10000000, sizeof(int));
if (p == NULL) {
  fprintf (stderr, "Malloc failed...\n");
  exit(1);
}

It'll have the same effect, but it's closer to proper form.  A user
reading this has a clear concept that you're allocating an array of
10000000 ints, and not some generic block of RAM.

By the way, the original program could have been made to work by
changing the original array to one of chars, and that would also work,
since sizeof(char) == 1.

>That should fix it...
>
>By the way, this code *could* fail on any Unix system too...

The original code would fail on any system.  One with memory
protection, because only 1/4 of the used memory was allocated.  One
without memory protection, because those systems usually don't have
virtual memory, and malloc() probably wouldn't be able to get that
much memory from the system.

Of course, quatas might keep malloc() from working, even if the code
is proper.
-- 
  |)  David Charlap          | .signature confiscated by FBI due to
 /|_  dic5340@hertz.njit.edu | an ongoing investigation into the
((|,)                        | source of these .signature virusses
 ~|~
Xref: sparky comp.os.os2.programmer:7346 comp.graphics:13434 comp.os.msdos.programmer:11818 comp.sys.ibm.pc.programmer:742
From: murrayk@prism.CS.ORST.EDU (the Dodger)
Newsgroups: comp.os.os2.programmer,comp.graphics,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer
Subject: Fixed point sqrt anyone?
Date: 6 Jan 93 06:04:54 GMT
Organization: CS Dept, Oregon State University
NNTP-Posting-Host: prism.cs.orst.edu


Well? Does anyone know of a quick and dirty way to get a reasonably accurate
square root of a fixed point integer number? My numbers are stored in a 16.16
bit format. I've heard of a few ways, but I'm open for ideas. I just want to
keep on avoiding floating point for ethical reasons. 8^)

Thanks.
Keith

-- 
                              ____          _____  ____
Keith Murray                 /     /___/ /\ \    \ \____    P.O. Box 1889
murrayk@prism.cs.orst.edu   /___  /   / /__\ \____\ ____\   Corvallis OR 97339
   the Dodger                  s  o  f  t  w\ a  r  e
Newsgroups: comp.os.os2.programmer
From: kwjung@vela.acs.oakland.edu (Kurt Jung)
Subject: Re: Getting DOS to talk to OS/2
Organization: Oakland University, Rochester MI.
Date: Sun, 10 Jan 1993 20:46:10 GMT

Paul Prescod writes:
>What I'm asking really isn't so complex...I want to start an OS/2
>editor from my DOS mail reader.  An OS/2 unzipper from my DOS term
>program.

One of the cleanest ways is to detach an OS/2 background process which serves
a named pipe.  The server just blocks on the pipe until another process opens
it and makes some pre-established request.  This way, the server can be used
for anything you might want to be done -- task switching, process execution,
process and thread information, and it can be done easily from either DOS or
OS/2.  Here is an outline:

  --- Server ---

  Call DosMakeNmPipe (Message mode is most convenient)
  do {
    Call DosConnectPipe
    do {
      Read client request with DosRead
      Process request (usually this amounts to more OS/2 calls and pipe reads
        and writes, depending on your message protocol)
    } until requested to disconnct
    Call DosDisConnectPipe
  } until requested to terminate pipe
  Call DosClose

  --- Client (DOS or OS/2) ---

  Open pipe as ordinary shared file
  Write request, usually some scalar like unsigned short
  Follow through with reads or writes, depending on protocol of your messages
  Write disconnect or terminate request
  Close file

I think it is best for it to send the disconnect message and close pipe prior
interactive use, and then to re-establish the connection when the interaction
is complete and the client is ready to make another request of the server.
This keeps the server available for other processes, since only one connection
can be made at a time.

-- Kurt
Newsgroups: comp.os.os2.programmer
From: kevin@wicat.com (Kevin Vigor)
Subject: Re: Surrendering timeslice under DOS?
Reply-To: kevin@elvis.wicat.com
Organization: WICAT Systems
Date: Sat, 9 Jan 1993 04:54:30 GMT

dburton@salzo.Cary.NC.US (David Burton) writes:

>kevin@wicat.com (Kevin Vigor) writes:

>> Once you know you're in an OS/2 DOS box, calling interrupt 2F with AX set to
>> 01680h will release the timeslice.

>Here's what I do:

<routine deleted to save space>

I hacked out some assembler source to a routine to detect and give up time-
slices under OS/2, WinDoze and DesqView and uploaded it to hobbes for anybody
who cares. It's not too pretty, but it works.
<oh, the file is SLICE.EXE>

-- 
		Peace & PopTarts, 
			Kevin
Email to the reply address will almost certainly bounce; use
72500.3705@compuserve.com
Newsgroups: comp.os.os2.programmer
From: jurlwin@gandalf.UMCS.Maine.EDU (Jeff Urlwin)
Subject: Re: malloc() and swapper.dat problems ....
Organization: University of Maine, Department of Computer Science
Date: Tue, 12 Jan 1993 02:56:11 GMT

In article <1993Jan11.073220.6853@netcom.com> daveb@netcom.com (Dave Briccetti) writes:
>malloc takes a "size_t" as an argument.  Your argument is too big.

Sorry.  Not the case with a 32bit compiler.  (size_t is unsigned int, thus
possible values are in the range of 0..4,294,967,296 (inclusive)).

The problem is not allocating enough space for all those integers to be 
scanned through.

Jeff
>
>Dave Briccetti, Owner, Dave Briccetti & Associates
>OS/2 Developer/Consultant
>P.O. Box 1713
>Lafayette, CA  94549-7013
-- 
--------------------------------------
jurlwin@gandalf.umcs.maine.edu

Newsgroups: comp.os.os2.programmer,comp.os.os2.advocacy
From: lmalloy@abacus.bates.edu (Laura G. Malloy)
Subject: Re: Why you should get everything in writing (long)
Organization: Bates College, Lewiston, Maine
Date: Fri, 8 Jan 1993 18:52:40 GMT

In article <1993Jan8.140504.6677@wraxall.inmos.co.uk> des@inmos.co.uk (David Shepherd) writes:
>Eirik Lygre (ekl@kvamdata.no) wrote:
>: I realize that Bob is pissed off -- I would, too. One thing, though, is that
>: the driver he needs is owned and copyrighted by Microsoft. Perhaps he could
>: talk to them, and have them release it. That way, he could (perhaps) get
>: his investment back. Given that Microsoft has a much better track record
>: with developer support, they would probably help him.
>
>You must be joking! Microsoft (and IBM) see OS/2 to be direct competition 
>with Windows and NT and they have been doing there best to hinder OS/2
>(or at least to do nothing that could be seen to promote it) - i.e.
>remove OS/2 support from MSC, terminate OS/2 SDK, generally badmouth OS/2
>at all opportunities, choose not to producve OS/2 v2 versions of their
>apps, limit OS/2 support in NT to character based. From a business
>point of view it is just not in MS's interest to allow any OS/2 orientated
>code that they have rights to out. 
>
>Of course this goes both ways - IBM did their best to make things difficult
>for MS after the break up by pointing out all the IBM patents that MS
>of someone else's battle.
>

While it's naive of me to think that MS might permit an OS/2 developer
to use its code, I would have thought that IBM, having been an OS/2
partner with MS for some time, would have rights to code developed at
least during the time of their joint work together or, depending upon
agreements, even after (it's not as if MS would really *need* code to an
OS/2 2.x driver, right?).  Doesn't IBM have any real say in this at all?

Joe Malloy
German Department / Hamilton College / Clinton, New York  

>--
>--------------------------------------------------------------------------
>david shepherd: des@inmos.co.uk                     tel: 0454-616616 x 625
>                inmos ltd, 1000 aztec west, almondsbury, bristol, bs12 4sq
>                New Year Resolution for 1993: Start using capital letters.
From: tanith@csd4.csd.uwm.edu (Michael D Kretzer)
Newsgroups: comp.os.os2.programmer
Subject: Re: MASM and `model os_os2'
Date: 12 Jan 1993 23:10:11 GMT
Organization: University of Wisconsin - Milwaukee
Reply-To: tanith@csd4.csd.uwm.edu
NNTP-Posting-Host: 129.89.7.4
Originator: tanith@csd4.csd.uwm.edu

From article <1993Jan12.170532.17948@olymp.informatik.uni-bonn.de>, by greve@rs1.thch.uni-bonn.de (Thomas Greve):
> After i found out that my masm 5.1 also has an OS/2 version, i tried
> to assemble some of the asm-samples of the toolkit, but masm choked on
> `model large,os_os2'. The `large' is not unusual, but the `os_os2'
> obviously is unknown to it. What does it mean (well, i can imagine it
> halfway), and what happens if i leave it out?

The OS_OS2 parameter to the .MODEL simplified segment directive instruction
indicates how .STARTUP and .EXIT behave.  If you don't use .STARTUP and
.EXIT, then OS_OS2 is not necessary.  .STARTUP and .EXIT are the macros
for startup and exit code respectively (DOS requires a program to set up
the DS and SS registers to point to its data and stack areas...OS/2 does
this for you automatically).

If you are compiling the device driver samples, you can delete os_os2
with no ill effects...,the .STARTUP and .EXIT macros are not used in
the code at all.

The OS_OS2 parameter to .MODEL was added with MASM 6.0.  The assembly
examples in the toolkit compile under MASM 6.0 with no modifications.

> Is masm 5.1 seriously useable for OS/2 2.0?

Yes, although I would suggest upgrading to MASM 6.0, because it adds
the ability to create 32-bit programs when using the FLAT model (also
several language extentions were added...plus, it's only $49 with
Microsoft's educational discount promotion at the moment).  But MASM
5.1 is definitely useable for OS/2 2.0...well, as far as Assembly language
goes :) :)

I have been using MASM 6.0 to write OS/2 2.0 device drivers for my work,
and MASM 6.0 is a great assembler for OS/2 2.0.  OS/2 2.0 programming
issues are even mentioned in the manual (too bad it's not mentioned on
the box that you can write 32-bit programs, as well as 16-bit OS/2 1.x
executables).
Newsgroups: comp.os.os2.programmer
From: amitp@ruf.rice.edu (Amit J Patel)
Subject: Re: Surrendering timeslice under DOS?
Reply-To: amitp@owlnet.rice.edu
Organization: Rice University
Date: Mon, 11 Jan 1993 22:51:52 GMT

In article <93010.071447U16244@uicvm.uic.edu>, David James Alexander Hanley <U16244@uicvm.uic.edu> writes:
|> >
|> >> Once you know you're in an OS/2 DOS box, calling interrupt 2F with AX set
|> >> 01680h will release the timeslice.
|> 
|>   Well, I tried this, and the program became REALLY slow.  The interrupt seemed
|> to be giving up almost a half-a-second, far more than I wanted.  Why might
|> this be?  I had in mind more like 1/100th of a second, so my program would
|> respond realtime.
|> 

I tried the timeslice code, too, and my program became unusably slow.
I also tried giving up the timeslice every n keyboard polls, but that
didn't help (after I thought about it, it made sense that it wasn't
better).


Are there any other time-slice methods in use?  Perhaps by doing the
DOS idle interrupt (28h?)?


	Amit

Newsgroups: comp.os.os2.programmer
From: cnadler@vnet.ibm.com (Cliff Nadler)
Subject: Re: OS/2 HELP facility -- how?
Date: Mon, 04 Jan 93 14:49:04 GMT
News-Software: IBM OS/2 PM RN (NR/2) v0.15 by O. Vishnepolsky and R. Rogers
Reply-To: cnadler@vnet.ibm.com (Cliff Nadler)
Organization: IBM T. J. Watson Research

In <1993Jan04.083533.9752@kub.nl> hoppie@kub.nl (Jeroen Hoppenbrouwers) writes:
>In the extensive original IBM OS/2 Reference Guides and Programming Guides
>I cannot find *anything* about OS/2's system help facility. I saw there's
>a Help Manager in the system, and I can call this one, but no word about 
>compiling a help database. How do I create such a beast? Is this a reason
>to get the IBM C-set/2 kit?

If you are trying to make files like the Command Reference or the REXX
Information, all you will need is the Toolkit and the Information Presentation
Facility manuals. If you are trying to add help to a program, then you will
need C-Set/2.

BTW, the /INF option of the IPFC compiler is now documented.

Cliff Nadler
IBM Federal Systems Company

Note: This post represents the views of the poster, not those of IBM or the
      IBM Federal Systems Company
Newsgroups: comp.os.os2.programmer
From: kendall@iat.holonet.net (Kendall Willets)
Subject: Re: Why you should get everything in writing (long)
Organization: HoloNet National Internet Access BBS: 510-704-1058/modem
Date: Sat, 9 Jan 1993 07:32:20 GMT

I think the end-of-queue driver takes metafiles and translates them to printer
lingo.  I had a printer problem and traced out a lot of this - try
double-clicking on a job icon in the queue; it comes up in the metafile
viewer.  The hard work is done at the end; hence the problem.

If the printer driver code ever gets pried loose from wherever I hope we
can all start writing ps drivers, fax drivers, and so forth.  I like the
in-box ps driver; I never liked the printer-as-computer concept.
From: francis@vnet.ibm.com (Tim Francis)
Date: Fri, 8 Jan 93 17:23:11 EST
Subject: Re: Why you should get everything in writing (long)
Newsgroups: comp.os.os2.programmer
Reply-To: francis@vnet.ibm.com
Organization: IBM Canada Lab, WorkFrame/2 development
Disclaimer: This posting represents the poster's views, not those of IBM

In article <1iko4qINN50t@cae.cad.gatech.edu>,
chris@cad.gatech.edu (Chris McClellen) writes:
>
>              ...  Hopefully, IBM's top brass will get some sense,
>and trim the real fat, and make every effort to turn IBM into a
>company that can be trusted, and that has a great track record
>for developer support  (customer support is good in my view, but
>that is subject to heavy debate).  I have yet to buy C/Set 2 for
>those kinds of reasons.  If I am going to buy a compiler (as opposed
>to using emx), I will buy from Borland (if they ever deliver...),
>since I could probably get more support from them [developer] than
>I could from IBM.  ...

Why do you single out C Set/2 as the product not buy?  Bob Cain's
experience (which I cannot comment on) was with OS/2 developer
support, not C Set/2 developer support.  I believe that the OS/2
developer support is improving daily, but regardless of that, the
compiler you use to develop OS/2 apps has no bearing on the quality
of the OS/2 developer support you'll receive.

We here in C Set/2 & WorkFrame land are as open, and accessible, as
we can be.  You can report bugs, or ask questions, via email, compuserve,
a 1-800 number, or even here (I'm replying less than 2 hours after
you made your post).

We don't expect to earn your business for free, or even easily.
Customer support is critically important to us, and we will do
whatever we can to make you happy.  Give us a chance.   -tim
Newsgroups: comp.os.os2.programmer
From: gilem@aix.rpi.edu (Michael R. Gile)
Subject: does C Set/2 produce Xrefs like the ibm rs/6000 cc
Organization: Rensselaer Polytechnic Institute, Troy, NY
Date: Fri, 8 Jan 1993 15:14:14 GMT

I am not familar with the C Set/2 compiler, but would be interested
to know if it can produce Xref's like the IBM RS/6000 compiler.  This
is a very rare feature among C compilers, yet is is VERY useful when 
debugging code, especially if you didn't write it, because it gives 
locations of declarations, and notes where a variable is modified.
I have yet to see a compiler for a pc that would readily generate this
information in such a useful form.

Mike
gilem@rpi.edu
From: hendrik@vedge.com (Hendrik Boom)
Newsgroups: comp.os.os2.programmer
Subject: Re: CSD for PDK IBM C set/2
Date: 12 Jan 93 17:31:58 GMT
Organization: Visual Edge Software Ltd.

jurlwin@gandalf.UMCS.Maine.EDU (Jeff Urlwin) writes:
: In article <C0IK98.EIs@acsu.buffalo.edu> utter@acsu.buffalo.edu (William M. Utter) writes:
: The next PDK CDROM will/should have fixes and updates to the BETA version
: that you have.  (As far as I know, it hasn't been released yet...and
: I certainly have no idea when.

I hope it's before Feb.15, when the old one expires...
: 
-- 
-------------------------------------------------------
Try one or more of the following addresses to reply.
at work:	hendrik@vedge.com,  iros1!vedge!hendrik
at home:	uunet!ozrout!topoi!hendrik
Newsgroups: comp.os.os2.programmer
From: Dennis.Ingram@bbs.actrix.gen.nz
Subject: Re: Dialogs + Threads = Problems. Help!
Organization: Actrix Information Exchange
Date: Mon, 4 Jan 1993 20:58:11 GMT


> The notes in the PM Reference make it quite clear that WinSendMsg to a
> window belonging to another thread IS allowed.  The message is sent 
> synchronously and the thread switching is automatic.
> 
> I've done it myself for years.
> 
> -- 
> 
> Dave Briccetti, Owner, Dave Briccetti & Associates
> OS/2 Developer/Consultant
> P.O. Box 1713
> Lafayette, CA  94549-7013

As I understand it, in order for a thread to use WinSendMsg it must
have a message queue.  I have always wondered what is the best thing
to do when you have multiple threads that need to access a window - do
you use WinPostMsg and block using semaphores, or define a queue and
use WinSendMsg?  What is the overhead of defining a message queue (in
terms of system resources), bearing in mind that the queue is only
there to allow WinSendMsg access?