HDTenEightyP/NetNews huggingface dataset:
From: bbs.dennis@tsoft.sf-bay.org (Dennis Yelle)
Newsgroups: comp.os.os2.programmer
Subject: getch() + Ctrl-C == locked program
Date: 4 Sep 92 20:35:29 GMT
Organization: The TSoft BBS and Public Access Unix, +1 415 969 8238

#if 0
When I compile this program with:
    icc /B"/st:0x08000" /Sm getch.c
and run it with:
    getch
It works OK unless I type a Ctrl-C.

If I type a Ctrl-C the program locks up and ignores all
other characters, and I can not get rid of the program.

I do not care if getch() returns the control-c to me or not,
but I do not want it to hang.

Can anyone help me with this problem?
#endif

#include <conio.h>
#include <stdio.h>
#include <stdlib.h>

main( int argc, char **argv)
{
        int c;
        
        argc = argc;
        argv = argv;
        
        printf( "Please press a key>");
        fflush( stdout);
        c = getch();
        printf( "\n" "thanks for the 0x%02X.\n", c);
        return 0;
}

--
Dennis Yelle (bbs.dennis@tsoft.sf-bay.org)
From: eletanjm@nuscc.nus.sg (TAN JIN MENG)
Newsgroups: comp.os.os2.programmer
Subject: Re: realtime application
Date: 3 Sep 92 16:14:05 GMT
Article-I.D.: nuscc.1992Sep3.161405.4623
Organization: National University of Singapore

seant@sunfish.ratsys.com (Sean D. True) writes:
: In article <Btyt27.JqD@world.std.com> fred@world.std.com (Fred A Putnam) writes:
: 
: >If you think you can take a data acq app that is currently running on DOS
: >with a 250 Hz interrupt rate, and get two of those to run in real time in
: >two OS/2 "DOS boxes", you're mistaken.  The DOS boxes won't run in real
: >time at all because they are being time-sliced with each other and with the
: >rest of OS/2.  The timer ticks are virtualized, and do not track in real time.
: 
: >Sorry, but I don't think this plan will fly..
: 
: Unfortunately, Fred is clearly right. A more effective solution might
: be to run DOS on a bunch of PC's (even SBCs) and use them to double buffer
: into a network file server. A simple semaphore system using the file system
: could be implemented without much trouble. The data rate into the network
: file server will probably be the limiting step, although you could probably
: saturate your available network bandwidth pretty quickly.
: 
: Tools to make this easy should be common. They aren't. If you can settle
: for programs-in-a-can, LabTech Notebook is pretty darn good.
: ================================================================
: Sean D. True
: Rational Systems, Inc.
: seant@ratsys.com -- uunet!rational!seant

I'm asking for details of LabTech Notebook now. In the meantime, the 2
Dos apps are ver much a temporary solution - more like a prototype than
anything else. Only one of the DOS programs is really realtime and its
not operating off the timer tick in any case - its operating off the
irq. The samples are taken in strict time by the data acquisition
hardware and the DOS program can take up to 25ms worth of jitter in
downloading the data without error so long as we don't miss an
interrupt.

As I said, very much temporary - unless the port into OS/2 proves to be
very easy

jin meng
Newsgroups: comp.os.os2.programmer
From: horne@edge1.pfc.mit.edu
Subject: How do YOU use your CMS 120 tape drive under OS2?
Organization: MIT PLASMA FUSION CENTER
Date: Wed, 26 Aug 1992 01:23:11 GMT


	Has any consensus emerged on how best to do backups with the CMS7 120
drive?  If you have a 120 and use it, tell me how (via E-mail); I'll
sift and summarise for the net.
From: dic5340@hertz.njit.edu (David Charlap)
Newsgroups: comp.os.os2.programmer
Subject: Re: C Set/2 Question in malloc
Date: 28 Aug 92 21:03:40 GMT
Organization: New Jersey Institute of Technology, Newark, N.J.

In article <59958@mimsy.umd.edu> pr@umiacs.umd.edu (Jesus Rodriguez) writes:
>|> >
>|> >SAMPLE.C(12:15) : error EDC0117: The operation between these types is not valid.
>|> >SAMPLE.C(12:10) : informational EDC0140: Operand has type pointer to  signed long integer .
>|> >SAMPLE.C(12:17) : informational EDC0140: Operand has type signed integer .
>
>|> >  if  (( array= malloc(50 * sizeof(long)))!= NULL)
>
>this line should read 
>if (( array = (long *) malloc(50 * sizeof(long))) != NULL)
>               ^^^^^^^ this is what needs to be added to the line.  

This shouldn't be a problem.  Under ANSI-C, malloc() is supposed to
return a (void *), not the (int *) that Unix-C uses.  (void *) types
are assignment compatible to any pointer type.


-- 
   |)  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.
From: seg@Ingres.COM (scott e garfinkle)
Newsgroups: comp.os.os2.programmer
Subject: Re: C Set/2 Problem with getch()
Date: 26 Aug 92 22:21:47 GMT
Organization: Garfinkle Consulting

In article <1992Aug24.203004.2629@njitgw.njit.edu> dic5340@hertz.njit.edu (David Charlap) writes:
>According to the Unix box I have here, you should use getchar().
>That's in <stdio.h>.  The getch() function is a curses function and is
>located in <cursesX.h>, a header/library that probably isn't available
>for OS/2 yet, and certainly doesn't ship with C Set/2.
IBM C Set/2 does, in fact, have getch(), as the original poster intimated.
He just  is having some funny problem installing the migration libraries,
wherein getch resides.

I usually wait to post until I realy know what I'm talking about.
	-Scott E. Garfinkle
Xref: sparky comp.os.os2.programmer:4449 comp.os.os2.misc:28237
From: S_JUFFA@iravcl.ira.uka.de (|S| Norbert Juffa)
Newsgroups: comp.os.os2.programmer,comp.os.os2.misc
Subject: Does math coprocessor speed up GUI (here: OS/2 presentation mgr)?
Date: 26 Aug 1992 12:44:01 GMT
Organization: University of Karlsruhe (FRG) - Informatik Rechnerabt.
Distribution: world
NNTP-Posting-Host: irav1.ira.uka.de
X-News-Reader: VMS NEWS 1.23

Hi netters!

I a recent article on coprocessors for 80x86 systems I posted to 
comp.sys.ibm.pc.hardware I claimed that installing a math coprocessor
does not speed up GUIs (MS-Windows, OS/2 Presentation Mgr, X-Windows),
since these use only integer math internally. However, people have
told me that some GUIs indeed use fp math for stuff like arc drawing
and similar operations. Does anyone know for sure whether OS/2's GUI
benefits by installing a coprocessor. Please send email, as I do not
usually read this group. I'll post a summary of responses I get, if I
get any. Thanx in advance!

Norbert
------------------------------------------------------------------------------
Norbert Juffa       email: S_JUFFA@IRAVCL.IRA.UKA.DE        Live and let live!

Newsgroups: comp.os.os2.programmer
From: db3l@ans.net (David Bolen)
Subject: Re: DosExitList Hangs Process (OS/2 V1.3)
Date: Mon, 31 Aug 1992 17:55:10 GMT
Organization: Advanced Network & Services, Inc. - Elmsford, NY

In article <1992Aug31.124258.980@beckman.com> rariedel@beckman.com (Bob Riedel) writes:

>It appears that my exit routine is not even being called since debug
>printf(s) never print when this situation occurs. The program will run to
>completion normally if Ctrl-C is not hit, and the exit handler is entered
>and functions normally.

You might try removing any dependency upon the C run-time library in your
exit handler (ie: the printf calls).  Since you can't depend upon the state
of your process while exiting (especially if you have interrupted it), you
should stick to OS/2 system calls.  For example, you may have interrupted your
process while it was in the middle of the C library, and calling routines in
the C library from the exit handler can either cause problems due to the
non-reentrancy of some routines, or hanging if you are using a multi-threaded
C library and it deadlocks due to internal thread-synchronization.

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).

Now, if you use the compiler library's capability for trapping interrupts
(ie: signal(SIGINT) if supported), or program exiting (atexit() if supported),
then you should be safe, since those functions are dispatched by the
compiler library itself, so it gets a chance to make sure things are in order
prior to calling the handlers.  Using DosExitList is going below the
compiler, so it doesn't get that same chance.

--
-- 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    \
\-----------------------------------------------------------------------/
Xref: sparky comp.os.os2.programmer:4503 comp.os.os2.misc:28473
From: thg@cam-orl.co.uk (Tim Glauert)
Newsgroups: comp.os.os2.programmer,comp.os.os2.misc
Subject: Re: Does math coprocessor speed up GUI (here: OS/2 presentation mgr)?
Date: 28 Aug 92 14:17:52 GMT
Organization: Olivetti Research Ltd, Cambridge, England.

In article <19920827.085206.286@almaden.ibm.com>, ADUNSMUI@TOROLAB6.VNET.IBM.COM (Al Dunsmuir) writes:
|> Tim,
|> 
|>   My understanding is that PMX performs not only the standard MIT X server
|> functions, but must translate the X-windows actions into the equivalent PM
|> actions.  Apparently this intermediate layer has the floating-point code in
|> question.

But this thread started with the claim that PM was fast because it was all
integer. So these guys are coverting from int to float and then back to int
again? Bizarre!
From: hamish@waikato.ac.nz
Newsgroups: comp.os.os2.programmer
Subject: Re: Accessing tcpipdll from watcom 9.0
Date: 3 Sep 92 16:40:55 +1200
Organization: University of Waikato, Hamilton, New Zealand

> 
> I am attempting to use the tcp/ip dll from watcom C/386 9.0 under OS/2 2.0, and
> have run into a bit of a problem. After adding the __cdecl __far16 combination
> to the prototypes in the *.h files, I can get such things as sock_init() and
> socket to work and return values, consistant with what they should. However I
> can't get the gethostbyname() function to return a decent valid pointer to a
> bloick of memory (ie the host entry). I have it declared as
> 
> struct hostent * __cdecl __far16 gethostbyname(char hostname[]);
> 
> and am declaring a ptr in the program as
> 
> struct hostent *host;
> 
> and doing 
> 
>  host=gethostbyname("sol.cs.waikato.ac.nz");
> 
> but the program dies trying to access the returned block with access
> violations. (The ptr returned is 0x0a4277bc if that helps). The executable is
> being linked with tcpipdll.lib (From the 1.2.1 programming toolkit).
> 
> I thought the thunking layers were supposed to provide access to 16-bit dll's?
> Or am I doing something wrong? Should I re-create the .lib file using wlib? Or
> should this work with the microsucks .lib file in the kit?
> 
> Or is there something else I am doing wrong?
> 
> TIA.
-- 
==============================================================================
|  Hamish Marson   <h.marson@waikato.ac.nz>                             OS/2 |
|  Programmer (n/5), School of Computing and Mathematical Sciences           | 
|  University of Waikato,                                                    |
|  Hamilton, New Zealand.                                                    |
|Disclaimer:  Anything said in this message is the personal opinion of the   |
|             finger hitting the keyboard & doesn't represent my employers   |
|             opinion in any way. (ie we probably don't agree)               |
==============================================================================
  Q. If Nuclear Tests are so safe, why don't the French do them under Paris?
From: "robert eidswick" <robert.eidswick@execnet.com>
Newsgroups: comp.os.os2.programmer
Subject: os/2 disk compression
Date: 27 Aug 92 21:56:46 EST
Reply-To: "robert eidswick" <robert.eidswick@execnet.com>
Distribution: comp
Organization: Executive Networks Information

August 10, 1992

Proportional Software Corporation today announced the DCF/2
Disk Compression Facility for IBM's'@ OS/2@ Version 2.0.

  In response to the needs of IBM OS/2 users, Proportional
Software has introduced the first dynamic disk compression
technology for OS/2 Version 2.0. The DCF/2, or Disk
Compression Facility/2 allows users to increase their local
physical disk storage without affecting applications software
or system behaviour.

  On-the-fly disk compression using the DCF/2 results in 35%
to 70% additional disk space, depending on the types of
information on the disk and the level of compression selected.
The Proportional Software DCF/2 uses native OS/2 file
structures to compress standard file information into less
physical space -- resulting in making a hard disk appear
bigger than it really is!

  DCF/2 compression compares favourably with the other
programs, like Stacker(TM), Superstor(TM), and Doubledisk(TM)
that do similiar disk compression for DOS.

  According to Fred Schmidt, Sales Vice President at
Proportional, the typical OS/2 user requires over 50 MB of
physical disk space for the OS/2 operating system, it's
swapfile, and basic utilities. Even though OS/2 includes both
a complete DOS and Windows environment, this still means that
there is a real crunch for space when a user upgrades from a
DOS or Windows environment. The DCF/2 offers a quick, easy,
and simple solution to this problem.

  Proportional Software is introducing the DCF/2 at $99.95
through December 31, 1992. The U. S. list price is $129.95.
We have a special price of $64.98 (50% of list for IBM
employees(for personal use, only) if they fax the order with a
copy of their IBM badge.

  Contact Herb Smith at 1-800-666-4672 or by
FAX at 1-800-955-4672, for further information. Callers from
outside of the continenal United States please call voice at
(303)-484-2665 or by fax at (303)-484-2670

  Also, please mention my name when you call,  thank you.
                Robert Eidswick.
--
Executive Network Information System  (914) 667-4567
International ILink Host
Newsgroups: comp.os.os2.programmer
From: nyet@cco.caltech.edu (n liu)
Subject: Recommend text for programming PM api in os2 gcc....
Organization: California Institute of Technology, Pasadena
Date: Thu, 3 Sep 1992 09:04:14 GMT

I'm using the non-emx gcc and I need a recommendation for a good
PM API reference, since I don't have the toolkit. My campus book
store has one for 1.x, but I didn't get it in hopes that there was
a more recent one. Do the "red books" carry any of this kind of
info?

Thanks in advance,
Nye
-- 
nyet@cco.caltech.edu
nyet@aerospace.aero.org
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: Fri, 4 Sep 1992 17:21:38 GMT

In article <GHENNIGA.92Sep4094517@ampere.ampere> ghenniga@NMSU.Edu writes:
>
>I tried a simple program to test this out:
>
>	PROGRAM TEST
>	X1 = 10.0
>	X2 = 2.0
>	Y1 = X1-5.0*X2
>	X3 = X1/Y1
>	STOP
>	END
>I ran it and it gave me the following on the command line:
>
>	run-time error M6103: MATH
>- floating-point error: divide by 0
>
>This is with MS Fortran 5.1 on a 486/33...So it appears that the problem is
>either specific to your hardware or MS Fortran 5.0. Again, this was with the
>protected mode libraries for OS/2 1.3 running under OS/2 2.0.

Thanks for trying it. I tried the same program and it crashed 2.0
but 1.3 survives - so it seems to be specific to my hardware. I think
I will report it to IBM. It seems weird that a simple program crashes
2.0 but not DOS.

>
>Gary Hennigan
>+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=++=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
>+= PhD Student, Computational Electromagnetics  | Member: Utilitarian  +=
>+= New Mexico State University                  | .signature club      +=
>+= email: ghenniga@NMSU.Edu                                            +=
>
>


Xref: sparky comp.os.os2.programmer:4507 comp.os.os2.apps:5617 comp.os.os2.misc:28481
From: uma@natinst.com (Uma Arunkumar)
Newsgroups: comp.os.os2.programmer,comp.os.os2.apps,comp.os.os2.misc
Subject: C Set/2 Question in malloc
Date: 28 Aug 92 15:48:36 GMT
Organization: National Instruments, Austin, TX



****************** C Set/2   QUESTION ************************
I am trying to compile a small program (to solve a problem in a huge program)
in C Set/2 version 1.00.
This program was taken from the C Set/2 Program Example given for malloc
using KWIKINF.

***************************************************************
The program is given below:
       
#include <stdio.h>
#include<malloc.h>
main()
{
   char str[50];
   long  *array;
   int i;
   for (i=0; i<50; i++)
       str[i]='m';

  if  (( array= malloc(50 * sizeof(long)))!= NULL)
     for (i=0; i<50; i++)
       *array++=1;

}
   
*********************************************************

When I compile giving the command 
            icc /c /w3 /o+ sample.c 

       I get the following error messages:


SAMPLE.C(12:15) : error EDC0117: The operation between these types is not valid.
SAMPLE.C(12:10) : informational EDC0140: Operand has type pointer to  signed long integer .
SAMPLE.C(12:17) : informational EDC0140: Operand has type signed integer .


This program compiles without any error in C compiler in Sun.

What is wrong in the above code?


I WOULD HIGHLY APPRECIATE SOME HELP.

Thanks in advance.

My Email address is uma@natinst.com.

uma.
From: feustel@netcom.com (David Feustel)
Newsgroups: comp.os.os2.programmer
Subject: Re: New CSD for C Set/2
Date: 28 Aug 92 23:56:42 GMT
Organization: DAFCO: OS/2 Software Support & Consulting

How many CSDs for C Set/2 have been released? How can they be
identified? Where can they be obtained? Thanks.

-- 
Dave Feustel N9MYI <feustel@netcom.com>
 
( New .sig under construction. Watch this space! )
Newsgroups: comp.os.os2.programmer
From: rda612c@monu6.cc.monash.edu.au (js [schwobby])
Subject: bios interrupt #13
Summary: .
Keywords: bios interrupt #13
Organization: Monash University, Caulfield Campus
Date: Thu, 27 Aug 1992 02:33:15 GMT

Hi group.


I would like to use something similar to bios#13 interrupt.
(which is sector read and write to disk)

I can read using it, but i can`t write using it.
(I know it inflicts with the sytems integretry).

Well, I need to use something similar.

  - is there any prot address i can write to?
  - is there an higher interrupt, which is reentrant an allows me to
    use it?
  - Is there any literature out there, where I can find sth. about the
    topic?


I don`t want to rewrite to much code, hence my reason to use it.



Thanks in advance.



regards
      Jobst



-- 
----------------------------------------------------------------------
rda612c@monu6.cc.monash.edu.au  | Jobst "Schwobby" Schmalenbach
19 York Street, Sth Caulfield, 3162, Australia, 69 - 3 - 5237348B
............Perfection means, that there is nothing left to take away.
From: marty@cs.utexas.edu (Marty J. Sirkin)
Newsgroups: comp.os.os2.programmer
Subject: Is there any way to execute a DOS program from a WINOS2 program?
Date: 28 Aug 1992 09:41:38 -0500
Organization: CS Dept, University of Texas at Austin
NNTP-Posting-Host: predator.cs.utexas.edu

   I have been playing around with WINOS2 (for fun), and noticed that the
WinExec call does not seem to function.  I seem to remember something from
a while back talking about this.

   The question is: Is there any way that I can have a Windows program
under WINOS2 execute a small DOS .exe??  Or is it simply not to be done?  Or
have I missed something really basic?

Thanks,
Marty
Newsgroups: comp.os.os2.programmer
From: seg@Ingres.COM (scott e garfinkle)
Subject: Re: C Set/2 Problem with getch()
Organization: Ingres, an Ask Company
Date: 26 Aug 92 22:29:18 GMT

In article <5s-n5j.feustel@netcom.com> feustel@netcom.com (David Feustel) writes:
>I'm trying to use getch() in C Set/2 to read from the keyboard with no
>echo. Link386 reports getch() not found. I tried to install the
>migration libraries using the os/2 install command, but I get an error
>message that install cannot write to a write-protected a disk.
Did you try copying the disk, then doing the instal just to see what would
happen?  getch() is, in fact, in the migration library.

>Is there a way to read without echo from the keyboard in full-screen
>mode in 32-bit code? Thanks.
Actually, I find it  just as convenient to use KbdCharIn  as getch().  They 
are both 16 bit calls, anyway.  Code fragment:
#define INCL_KBD
#include <os2.h>
{
	KBDKEYINFO kbinfo;
	KbdCharIn(&kbinfo, IO_WAIT, 0);	// use IO_NOWAIT if you don't want to wait
	if((c = kbinfo.chChar) == 0|| c == 0xe0)
	{
		extended_char= TRUE;
		c = kbinfo.chScan;
	}
	else
		extended_char = FALSE;
}
From: sl31+@andrew.cmu.edu (Stephen M. Lacy)
Newsgroups: comp.os.os2.programmer
Subject: Re: Does math coprocessor speed up GUI (here: OS/2 presentation mgr)?
Date: 26 Aug 92 10:47:17 GMT
Article-I.D.: andrew.Qeax6pS00Vot8FvkYs
	<19920826.074333.779@almaden.ibm.com>
Organization: Sophomore, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA

Excerpts from netnews.comp.os.os2.programmer: 26-Aug-92 Re: Does math
coprocessor s.. Al Dunsmuir@TOROLAB6.VNE (1580)


>   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.


Why is this so?  I thought that X used all integer based math too.  The
reason that I'm asking is that I just saw PMX on a machine other than my
own for the first time a couple days ago, and I was really really
impressed.  It was not much slower than running right on the console of
one of the DecStations here at work, where on my computer it was
spitting out text at maybe 4800+ baud (which is slow)   I was also
trying to figure out where the greatest difference in speed was, here
are the two setups:

My Computer: 16 Mhz '386  10 Meg RAM
    Token Ring Card (4 mega-bits per second DTR)
    Regular VGA (8-bit)

Friends Computer: 50 Mhz '486 8 Meg RAM
    EtherNet Card (10 mega-bits per second DTR) 
    Trident video card running in VGA mode

My first idea was the video card, since video I/O seemed very slow on my
computer, but then I thought "well, maybe its the network card"  What
convinced me that this was not trus is that both of our FTP's from a
local machine (i.e. a machine that we would be running X applications
from) achieve about the same DTR.  (DTR=Data Transfer Rate) So, I
thought for a while it was just the speed of the computer, but I don't
think that would make all that much difference in this situation.  You
now mention the co-processor, and that it gives a large speedup.  Could
the co-processor be where the real speed lies?  If getting myself a
cyrix would be a cheap way to have it run at a more reasonable speed,
I'll order one today!

Thanks.

"Now it's over I'm dead and I havn't done anything that I want -- or I'm
still alive and there's nothing I want to do." -They Might Be Giants
From: fred@world.std.com (Fred A Putnam)
Newsgroups: comp.os.os2.programmer
Subject: Re: realtime application
Date: 2 Sep 92 19:06:06 GMT
Organization: The World Public Access UNIX, Brookline, MA

Our company, LABTECH, is the developer of a data acquisition software
application package which runs on DOS and OS/2 (LABTECH NOTEBOOK).

If you think you can take a data acq app that is currently running on DOS
with a 250 Hz interrupt rate, and get two of those to run in real time in
two OS/2 "DOS boxes", you're mistaken.  The DOS boxes won't run in real
time at all because they are being time-sliced with each other and with the
rest of OS/2.  The timer ticks are virtualized, and do not track in real time.

Sorry, but I don't think this plan will fly..

--
Fred Putnam, LABTECH, fred@labtech.com, 1-800-TRY-LABTECH
Newsgroups: comp.os.os2.programmer