HDTenEightyP/NetNews huggingface dataset:
From: KENKAHN@PKSMRVM.VNET.IBM.COM ("Kenneth A. Kahn")
Newsgroups: comp.os.os2.programmer
Subject: Re: How can I read the MBR (Master Boot Record) under OS/2?
Date: 28 Aug 92 21:49:51 GMT

Organization: Staff of IBM Fellow - NetWork Computing
Disclaimer: This posting represents the poster's views, not those of IBM
News-Software: UReply 3.0
X-X-From: KENKAHN@PKSMRVM.VNET.IBM.COM (Ken Kahn)

In <N2c9PB2w165w@tsoft.sf-bay.org> Dennis Yelle writes:
>
>I am trying to read the Master Boot Record from my C: drive
>under OS/2.
>

I'm not familar with the IOCtl Inetrface for doing this, but the same effect
can be accomplished with the following code:

  HFILE  BR_Handle;
  USHORT BR_Action;

  RC = DosOpen("C:",&BR_Handle,&BR_Action,0L,FILE_DIRECTORY,
               OPEN_ACTION_OPEN_IF_EXISTS,
               OPEN_ACCESS_READWRITE+OPEN_SHARE_DENYNONE+OPEN_FLAGS_DASD,
               ,0L);

The important part here is the OPEN_FLAGS_DASD.  This tells OS/2 that this
is a request to open a Drive rather than a file.  You can then use the handle
(BR_Handle) with DosRead and DosWrite to manipulate the Drive; i.e. the first
256 Bytes are the Boot Record.

Newsgroups: comp.os.os2.programmer
From: kbass@gmuvax2.gmu.edu (Ken Bass)
Subject: Re: Division by 0 crashes OS2/2.0
Organization: George Mason University, Fairfax, Va.
Date: Thu, 3 Sep 1992 14:50:40 GMT

In article <1992Sep3.131306.13751@tc.cornell.edu> bai@msiadmin.cit.cornell.edu (Dov Bai-MSI Visitor) writes:
>In article <92Sep03.032755.21494@acs.ucalgary.ca> bauwens@acs.ucalgary.ca (Luc Bauwens) writes:
>>In article <21529@optima.cs.arizona.edu> shack@cs.arizona.edu (David Shackelford) writes:
>>>In article <1992Sep2.163508.17347@tc.cornell.edu> bai@msiadmin.cit.cornell.edu (Dov Bai-MSI Visitor) writes:
>>>>The following short program compiled with MS-FORTRAN 5.0 with 
>>>>coprocessor crashes OS2 Ver. 2 on my machine:
>>>
>>>Sounds interesting.  Are you compiling to a DOS program and running
>>>it in a VDM, or an OS/2 program?  If OS/2, is it with the 1.x or 2.0
>>>libraries?  Please post more information...
>>
>>If he uses MS-Fortran, it got to be a DOS program.
>
>No, MS-Fortran 5.0 is both a real & protected mode product. I think
>that 5.1 merely adds Windows functionality that does not exist in 5.0.
>
>>
>>I tried with Ms Fortran 5.1 and with Watcom fortran 386 V9.
>>
>>Both return an answer 1.00000000.
>
>It that is true, it is really bad - I would not trust such 
>a compiler for any serious numerical work. 
>
>>
>>Luc B
>>
>>
>
>Dov 

Many motherboards (Micronics Rev E specifically), and I'm sure others,
have a hardware problem with trapping floating point errors. This causes
the problem, not the compiler. The compiler has no effect on this, I
dont believe. 

   ---Ken

-- 
Ken Bass (kbass@gmuvax2.gmu.edu)              |   Telecommunications  
George Mason University                       |   Techniques Corp, 
Student, Department of Electrical Engineering |   Software Engineer 
Newsgroups: comp.os.os2.programmer
From: bsn@world.std.com (Brent S Noorda)
Subject: WPS Program objects from cmd, Rexx, or C
Summary: How to access WPS program objects from cmd, rexx, or C?
Organization: The World Public Access UNIX, Brookline, MA
Date: Fri, 4 Sep 1992 12:18:16 GMT

I set up program objects' settings so that by double-clicking on them in
the WPS I can launch them in wonderful ways. For example, I can set up
a desktop Program Object to launch a program in a DOS session with such-and-
such memory and window, etc...  Now I can launch this program with these
setting whenever I want by using a mouse on the shell.  But is there any
way to launch these same programs with the same settings from the command
line or from Rexx or from C programming?
Can messages be sent to the shell?
Are the settings saved somewhere accesible?
From: dic5340@hertz.njit.edu (David Charlap)
Newsgroups: comp.os.os2.programmer
Subject: Re: ObjectVision from Borland
Date: 26 Aug 92 20:55:15 GMT
Organization: New Jersey Institute of Technology, Newark, N.J.

In article <1992Aug24.220020.19996@ccu.umanitoba.ca> jjs@ubitrex.mb.ca (John Joseph Strybosch) writes:
>Is anyone out there using ObjectVision from Borland, for OS/2?

No, but I've read a description of it in Borland Language Express.

>I'd like to know exactly what it is, what it's capable of doing, what
>your learning curve looked like, and, of course, what you think of it.

It's a new programming language.  Most of the "coding" is done by
drawing flow charts, syntax diagrams, and interface elements, with
very small amounts of "text-based" code in it.  It can interface to
many popular languages, including C, REXX, and Pascal.  It can work
with popular databases, including dBase, Excel, and OS/2 Database
Manager. 

>All I know is that it is something like a prototyping tool, and is
>quite slow. 

I wouldn't try developing a finished product with it, but it appears
to be quite useful for rapid prototyping.


-- 
   |)  David Charlap           "I don't even represent myself
  /|_  dic5340@hertz.njit.edu   sometimes so NJIT is right out!.
 ((|,)
  ~|~  Hi! I am a .signature virus, copy me into your .signature file.
Newsgroups: comp.os.os2.programmer,comp.os.os2.advocacy,comp.os.ms-windows.advocacy,comp.os.ms-windows.programmer.win32
From: parry@yoyo.cc.monash.edu.au (Tom J Parry)
Subject: Re: FSFILTER.SYS
Originator: parry@yoyo.cc.monash.edu.au
Organization: Monash University, Melb., Australia.
Date: Fri, 4 Sep 1992 04:46:06 GMT

Kurt Olender (kurt@alumni.cs.colorado.edu) wrote:
> 
> Don't understand your problem?  I put the device=fsfilter.sys in
> my config file for DOS image file and it worked great.  I have both
> my C and D drives formatted for HPFS and could read both and run
> DOS programs from them.

Yes, but try boot DOS from another drive (not in OS/2 at all) eg from Boot
Manager and FSFILTER is useless to you because HPFS is not running.

-- 
Tom J Parry.
Your reality is a figment of my imagination.
Newsgroups: comp.os.os2.programmer
From: des@frogland.inmos.co.uk (David Shepherd)
Subject: Re: gcc error in <stdio.h>
Organization: INMOS architecture group
Date: Wed, 26 Aug 92 11:32:12 BST

In article <1992Aug25.210547.128@physc1.byu.edu>, robertson@physc1.byu.edu writes:
>>   I just started using gcc today.  I am new to c programming as well.
>>   After installing gcc for OS/2 and following the directions in the
>>   README and INSTALL files in the \gnu\doc directory, I read through
>>   the first 30-40 pages about the command line parameters.  I thought
>>   I understood so I tried to invoke the command from the gnu directory:
>>
>>          gcc samples\sample1.c -ansi -pedantic -g
>>
>>   which tells me that I have an error:
>>
>>          E:\GNU\GCC-INCLUDE/stdio.h:313: syntax error before `int'
>>
>>   I assumed that 313 meant in line 313 so I looked it up
>>   It is this:
>>          static inline int__sputc[int_c, FILE *_p] {
>                  ^^^^^^
>    I deleted this word and now it works.  I thought to delete it
>    because when I looked up static in my c book it always preceded a
>    variable type.  So I tried it.   Why does it now work?  Did I mess
>    the header up at all?

i think the situation is that "inline" is an additional feature to
gcc that tells gcc to expand that function into inline code
on all calls (i'd expect that it has to be static).

you're probably quite correct about it not being in your c book as
its an additional feature in gcc.

your problem occurs because of the -ansi switch where you tell gcc
to only accept ANSI-C syntax (i.e. report K&R style *and* any gcc
extensions as errors).

I don't think you need the -ansi switch *unless* you really want to
check of ansiness (ansisity ?) of the code as gcc sort of auto-detects
what sort of code its getting on the fly. then your problem may
go away.

related to this ... there are some other problems as gcc uses inline
functions for things that other headers define as macros which
various sources try to redefine by #undef, #define which of course
now fails.

Also, i get occasional problems with a couple of inline functions
(forgotten which one buts its towards the end of math.h among
other places ... abs() ?) which won't parse correct if gcc thinks
its parsing non-ansi C or something like that.


-- 
--------------------------------------------------------------------------
david shepherd: des@inmos.co.uk or des@inmos.com    tel: 0454-616616 x 625
                inmos ltd, 1000 aztec west, almondsbury, bristol, bs12 4sq
                "i don't consider myself to be narcissitic .... if i had a
                 role model from mythology it would be zeus" - woody allen
From: sip1@ellis.uchicago.edu (Timothy F. Sipples)
Newsgroups: comp.os.os2.programmer
Subject: Re: Codeview barfing...
Date: 3 Sep 92 17:59:57 GMT
Reply-To: sip1@midway.uchicago.edu
Distribution: usa
Organization: Dept. of Econ., Univ. of Chicago

In article <1992Sep3.170937.17917@cs.uoregon.edu> santeew@sisters.cs.uoregon.edu (Wes Santee) writes:
>'Lo all, and apologies if this is a FAQ.
>My work requires me to use C7 in some development work
>that I am doing for them.  I, however, refuse to use Windows 3.1,
>or DOS w/386 Max.  I run an all OS/2 2.0 ship.
>I've got the special OS/2 hosted compiler for C7, but that
>only solves half of the problem.  Codeview 4.0 WILL NOT run.
>OS/2 traps it and shuts down.  I can't very well develop
>without a debugger now and I REFUSE to go back to DOS/Win.

Rumor has it that IBM has released a DPMI patch of some sort which
allows C7 to run under OS/2 2.0.  More when I know more.

I can't remember where I saw this information, unfortunately.  But I'm
sure the patch, if it exists, will drift across ftp-os2.nmsu.edu
and/or software.watson.ibm.com.

-- 
Timothy F. Sipples      | The OS/2 FREQ. ASKED QUESTIONS LIST is avail. from
sip1@ellis.uchicago.edu | 128.123.35.151, anonymous ftp, in /pub/os2/all/faq.
Dept. of Econ., Univ.   | Or from LISTSERV@BLEKUL11.BITNET (send "HELP").
of Chicago, 60637       | Family Values Means a Job
Xref: sparky comp.os.os2.programmer:4469 comp.os.os2.apps:5562
From: wtracey@vnet.ibm.com (Bill Tracey)
Date: Wed, 26 Aug 92 23:04:54 EDT
Newsgroups: comp.os.os2.programmer,comp.os.os2.apps
Subject: Re: Exporting variables from DLL's
Reply-To: wtracey@vnet.ibm.com
Organization: IBM Corp.
News-Software: UReply 3.0

In <1992Aug26.213514.14162@natinst.com> Malathi Ramdas writes:
>     Is it possible to export global variables from a DLL? I have written a
>DLL that exports 3 variables. I have created an import library for an appl
>ication that wishes to use this DLL. As soon as I try to run this application
>it complains about not being able to find these variables in the DLL module.
>It seems like from the export declararions in the .def file it is assuming
>that these are functions and not variables. Should I be doing anything differe
>nt or is it simply impossible to export global variables? By the way, I am compi
>ling and linking the DLL application using CSET/2 and LINK386.
>


This should work just fine.  Is it possible the DLL was linked with
the /noi (noignorecase) option and the calling application was linked
without it?  One common mistake that causes errors like this is for the
case of the variable in the DLL to be different than the case of the
variable in the calling program.  If the case of the variable name in
the error message is different from the case of the variable name in the
DLL code then the case mismatch is probably the problem.

Hope this helps,

Bill Tracey
Newsgroups: comp.os.os2.programmer
From: bai@msiadmin.cit.cornell.edu (Dov Bai-MSI Visitor)
Subject: Re: Division by 0 crashes OS2/2.0
Organization: /usr/local/lib/news/organization
Date: Thu, 3 Sep 1992 03:08:06 GMT

In article <21529@optima.cs.arizona.edu> shack@cs.arizona.edu (David Shackelford) writes:
>In article <1992Sep2.163508.17347@tc.cornell.edu> bai@msiadmin.cit.cornell.edu (Dov Bai-MSI Visitor) writes:
>>The following short program compiled with MS-FORTRAN 5.0 with 
>>coprocessor crashes OS2 Ver. 2 on my machine:
>
>Sounds interesting.  Are you compiling to a DOS program and running
>it in a VDM, or an OS/2 program?  If OS/2, is it with the 1.x or 2.0
>libraries?  Please post more information...

I am compiling and running it as an OS/2 program, not in a VDM. It is
compiled with the same libraries for both 1.3 & 2.0 (LLIBFOR7.LIB -
the 16-bit protected mode large-model library that comes with MS-FORTRAN
5.0). Without division by 0 I have no problems with codes compiled
with that library. Exactly the same executable crashes 2.0 with "internal
processing error...", but running as it should (i.e. with the run time
error message) when I boot with a 1.3 floppy. It has been such a nuisance
that I replaced 2.0 with 1.3 on my disk, but I would rather work with
2.0.

>
>David Shackelford			IBM Tucson
>shack@cs.arizona.edu			SUPL74Y1 at TUCVM2

Dov
















Newsgroups: comp.os.os2.programmer
From: meek@fizzy.csu.murdoch.edu.au (Lindsay Meek)
Subject: DosReadQueue and Timeouts
Summary: Help on API Interface
Keywords: API Interface
Organization: Murdoch University
Date: 21 Aug 92 04:23:20 GMT

Hello OS/2 people,
	I'm trying to write a queue handler that incorperates the timeout
feature available with semaphores i.e. DosSemWait(semaphore,timeout(ms))
	I'm habving trouble getting DosReadQueue to suspend for a finite
duration . Im using DosStartTimer and DosStopTimer and supplying the same
semaphore as that used by the DosReadQueue function (in the hope that
the Timer will signal on behalf of the DosReadQueue function). But it ain't
working..
	Has anybody had experience with this, or can suggest a method for
doing it using the API calls?               

Thanks
	Lindsay Meek (meek@fizzy.csu.murdoch.edu.au)
From: dic5340@hertz.njit.edu (David Charlap)
Newsgroups: comp.os.os2.programmer
Subject: Re: X/Motif to PM Questions
Keywords: motif xwindows pm
Date: 26 Aug 92 20:35:48 GMT
Organization: New Jersey Institute of Technology, Newark, N.J.

In article <103@slpfs1.UUCP> jct@slpfs1.UUCP (Jeff Tolmie) writes:
>
>
>In my previous article I wrote:-
>>     Event-Callback-xxx(...) { ...	 	WndClientProc(...) { ...
>> 
>>  file. The two windows each have ONE event handler. The default for the
>>  drawing area is usually called WndClientProc. Now, you have to write a 
>
>Before anyone else says it, that should be ClientWndProc.

The procedure could be anything.  It's just another function (declared
with the EXPENTRY qualifier) and can have any name.  It is passed to
the WinRegisterClass function when declaring the class to OS/2.

I normally call it MessageHandler().
-- 
   |)  David Charlap           "I don't even represent myself
  /|_  dic5340@hertz.njit.edu   sometimes so NJIT is right out!.
 ((|,)
  ~|~  Hi! I am a .signature virus, copy me into your .signature file.
Newsgroups: comp.os.os2.programmer
From: db3l@ans.net (David Bolen)
Subject: Re: Problem with WM_ACTIVATE.
Date: Thu, 3 Sep 1992 11:10:57 GMT
Organization: Advanced Network & Services, Inc. - Elmsford, NY

In article <d#lnmz+.daveb@netcom.com> daveb@netcom.com (Dave Briccetti) writes:

>dic5340@hertz.njit.edu (David Charlap) writes:
>: Not really.  You'll have to remote-debug it.  You can't run a debugger
>: on the same machine as the PM code you're debugging.  It halts lots of
>: things. 
>
>What???  I've been doing it for years.  Occasionally I'll have to put
>printf's in, but most of the time I do quite well with Codeview or IPMD.

Well, I think David's comment should have been more along the lines of it can
be somewhat difficult (or dangerous perhaps?) to run a debugger on the same
machine as the PM code you are developing, but it's not impossible.  And until
IPMD that debugger had to be a text mode debugger (ie: you couldn't use
Multiscope in PM mode when debugging PM applications), and you had better make
sure not to stop your program at a breakpoint in a message procedure and then
Ctrl-ESC out of the debugger back to the PM screen.  Instant system hang.

This all relates back to the single input queue for applications and since
the debugged application was processing a message (and at a breakpoint),
you couldn't use the keyboard/mouse to switch back to the debugger to
continue the application.

Personally, I've done all of my PM debugging using CodeView (and now IPMD)
on the same machine as the code I was debugging.  I've also hung (and had
to reboot) my machine a good number of times under CodeView when reflex took
over and I Ctrl-ESC'd back to PM while still at a breakpoint.  [It's that,
"start-pressing-the-ke...SH*T!" syndrome :-)  at least CAD still worked]

Anyway - IPMD has different debugging modes (synchronous/asynchronous I
think - I haven't played with them much), that is supposed to take care
of this, allowing you to use the PM debugger to debug PM applications.  I
haven't yet had a chance to use it, but it sounds nice.

-- David
--
/-----------------------------------------------------------------------\
 \              David Bolen             \  Internet: db3l@ans.net      /
  |   Advanced Network & Services, Inc.   \   Phone: (914) 789-5327   |
 / 100 Clearbrook Road, Elmsford, NY 10523  \   Fax: (914) 789-5310    \
\-----------------------------------------------------------------------/
Newsgroups: comp.os.os2.programmer
From: cnadler@vnet.ibm.com
Subject: Re: REXX question
Note: This contains the views of the appender, not IBM Corporation.
Date: Mon, 24 Aug 92 01:18:58 GMT
Organization: Federal System Company, IBM Corporation

In  <MONTY.92Aug21122301@blackhole.lerc.nasa.gov>  monty@blackhole.lerc.nasa.gov (Monty Andro) writes:
> 
> Hello,
> 
> I'm rather new to using REXX and can't seem to find what I need in the
> online documentation.  I would like to start an application from REXX
> and be able to send it characters as if they came from the keyboard.
> Is this possible with REXX ?  Normally a program after it has started
> waits for keyboard or mouse input.  I want to simulate this keyboard
> I/O from REXX.  Any suggestions or hints on the feasibility of my need
> would be greatly appreciated.
> 
> Monty
> 

Well, if the program is truly reading from standard in, and not directly from
the keyboard, you could use lineout() to write the data to a file, and then
use :
   TYPE keyinput | pgm
wher pgm is the program you want to run.

Unfortunately, REXX/2 does not have the capability to push data onto it's
queue and have it show up in the next program's input stream (like it can
in CMS REXX).

Cliff
Newsgroups: comp.os.os2.programmer,comp.os.os2.misc
From: orville%weyrich@tnet.com (Orville R. Weyrich)
Subject: Re: Does math coprocessor speed up GUI (here: OS/2 presentation mgr)?
Reply-To: tnet.com!weyrich!orville
Organization: Weyrich Computer Consulting
Date: Wed, 2 Sep 92 05:59:29 GMT

In article <1992Aug31.034803.27829@unixg.ubc.ca> ochealth@unixg.ubc.ca (ochealth) writes:
>
>
>This is pure speculation, as I haven't checked out the 386/7 or 486 instructions
>but couldn't some PM applications seem faster because OS/2 can shove several
>instructions at the coprocessor, and then continue with another task?
>
>I thought that the CPU and the FPU worked more-or-less independently of

As far as I know, the O/S makes no difference -- it is entirely possible
to have the 80x86 chip do some non-dependent ** calculations while the
80x87 chip is doing it's thing. There is an instruction that is the 
equivalent of a "join" -- it forces the 80x86 to wait for the 80x87 to
complete its work before the program procedes further. But if there is
something else that the 80x86 can do in the meantime [typical example:
index or pointer arithmetic], the the only limitation is that of the
programmer's or compiler's intelligence. 

** A  non-dependent calculation is one that can be done using input
data that is not being produced by the co-processor.

It is poor programming practice to leave out the "wait" instruction --
even if the timing works out alright now, a future version of the
80x87 or 80x86 [or combined equivalent] might have different cycle times
for the two parallel execution threads and the program might fail on those
processors.

orville

--------------------------------------       **********************************
Orville R. Weyrich, Jr.                          Weyrich Computer Consulting
Certified Data Processor                       POB 5782, Scottsdale, AZ 85261
Certified Systems Professional                      Voice: (602) 391-0821
Certified Computer Programmer                Internet: orville%weyrich@tnet.com
--------------------------------------       **********************************
>each other. Under DOS anyway, I thought the CPU had to wait for the FPU
>to finish to get results back.
>
>jpm
>
>-- 
>______________________________________________________________________________
>jpm: ochealth@unixg.ubc.ca         
>                            Happily using OS/2 2.0 because MS Windows isNT ___
>                                                      Insert VapourFeature ^^^
From: dic5340@hertz.njit.edu (David Charlap)
Newsgroups: comp.os.os2.programmer
Subject: Re: DosExitList Hangs Process (OS/2 V1.3)
Date: 1 Sep 92 13:52:14 GMT
Organization: New Jersey Institute of Technology, Newark, N.J.

In article <1992Aug31.215344.36276@ans.net> db3l@ans.net (David Bolen) writes:
>
>It's a pain, but try backing out to simple DosWrite's to stdout (you should
>be able to use "fileno(stdout)", or just "(HFILE)1" I think).  Or, you can
>create your own version of printf that is safe to call from the exit handler
>(ie: just uses OS/2 system calls).

It's probably easier to use VioWrtTTY calls.  I can post the syntax if
you need it.


-- 
   |)  David Charlap           "I don't even represent myself
  /|_  dic5340@hertz.njit.edu   sometimes so NJIT is right out!.
 ((|,)
  ~|~  Hi! I am a .signature virus, copy me into your .signature file.
Newsgroups: comp.os.os2.programmer
From: tenny@euclid.uucp (Nathan Tenny)
Subject: Trying to write PM stuff with EMX
Summary: WinCreateMsgQueue doesn't like me.
Organization: Department of Mathematics, University of Oregon
Date: Wed, 26 Aug 92 19:48:00 GMT


What causes WinCreateMsgQueue to return NULL?  I'm passing it what appears
to be a perfectly good anchor block handle (returned from WinInitialize).

More generally, does anybody have working sources for a simple program using
the GPI functions that they'd be willing to post/email?  I have the VNR book
on the GPI, but it's weak on basics.

Thanks

	NT
Newsgroups: comp.os.os2.programmer,comp.os.os2.misc
From: richk@grebyn.com (Richard Krehbiel)
Subject: Re: Does math coprocessor speed up GUI (here: OS/2 presentation mgr)?
Organization: Grebyn Timesharing
Date: Thu, 27 Aug 1992 21:34:32 GMT

In article <1992Aug27.102130.9367@cam-orl.co.uk> thg@cam-orl.co.uk (Tim Glauert) writes:
>In article <19920826.074333.779@almaden.ibm.com>, ADUNSMUI@TOROLAB6.VNET.IBM.COM (Al Dunsmuir) writes:
>|>   Having said that, having a math coprocessor (especially a tightly coupled
>|> one as implemented in the 486) can speed up OS/2 applications.  For example,
>|> IBM's X-Windows server (PM screen interface for TCP/IP) achieves __dramatic__
>|> performance gains when a math coprocessor is present.
>
>I wonder why that is?  The MIT X sample server only uses floating-point code
>where the integer equivalent is likely to be slower, and only for primitives
>such as arcs and wide lines.

They are probably determining whether integer code is likely to be
slower on *workstations*, where floating point hardware is the norm
and is probably only slower than integer code by a factor of two or
three.  On a 386 without a 387, floating point code is slower by
several orders of magnitide, worse if the 387 instructions are being
trapped and emulated.
-- 
Richard Krehbiel                                 richk@grebyn.com
OS/2 2.0 will do for me until AmigaDOS for the 386 comes along...