HDTenEightyP/NetNews huggingface dataset:
From: eletanjm@nuscc.nus.sg (TAN JIN MENG)
Subject: Re: Communication between DOS windows
Organization: National University of Singapore
Date: Tue, 18 Aug 1992 06:10:04 GMT

In article <92230.152601U55870@uicvm.uic.edu> you write:
:   I am writing a bbs program that will run under ms-dos and will require a
: special term program.  To do this properly, it would seem easiest to hook
: up two machines through the srial prot, and develop the bbs program on one,
: the the term on the other.  However, I do not have two machines at my disposal,
: so I have a problem.  I would like to use os2( I'm using it now anyways ) and
: run the term program in one window, and the bbs program in another.  I can
: develop the software this way, and worry about adding the serial/phone routines
: when the bbs software is completely written/debugged.  Does anyone know of a
: practical way to communicate between DOS windows in os2?  I need to send
: information bolth ways, obviously, just like a bbs and term.  Thank you
: for any help.
: 
: 
: dave

I take it you do not want to emulate the actual serial comms - just any byte
stream will do.

Well with named pipes, a Dos program can communicate with an OS/2
program. With this as a basis, you can have DOS to DOS comms. Here's 
how it works ...

-	run the OS/2 program. It sets up 2 pairs (4) of named pipes.
	call them "\pipe\termread", "\pipe\termwrite", "\pipe\bbsread"
	and "\pipe\bbswrite". I'll refer to them by the short form
	names termread,termwrite,bbsread,bbswrite.

- 	The OS/2 program is the server for this. It reads from termread
	in order to write to bbswrite and reads from bbsread to write to
	termwrite.

-	The DOS term program reads from termwrite and writes to
	termread. The DOS bbs program reads from bbswrite and writes
	to bbsread.

That's all. DOS programs can open and use pipes using normal file system
IO calls. Your main problem is writing the probably short OS/2 program
to do this.

How's that?

hope it helps

jin meng
From: wayned.bbs@cybernet.cse.fau.edu
Newsgroups: comp.os.os2.programmer
Subject: Re: WHERE IS AVIO!!!!!!
Date: 23 Aug 92 04:35:20 GMT
Organization: Florida Atlantic University, Boca Raton

sl31+@andrew.cmu.edu (Stephen M. Lacy) writes:

> I'm trying to get a sample program that I've typed in from Petzold's
> book on programming the OS/2 Presentation Manager.  The problem (I guess
> you could call it a problem) is that the program uses the AVIO
> mechanisms.  I'm using the native port of GCC 2.1, and there doesn't
> seem to be any support for the AVIO things!!!  WHATS UP WITH THIS!!!  I
> thought it supported full programming of the OS/2 API, but I used "Seek
> and Scan files" and there are no entries for any of the Vio* functions!!
>   Is this header file available from somewhere?  I was depending on this
> working for a class that I am taking this coming semester in computer
> graphincs that I was planning on using OS/2 and PM for.   PLEASE RESPOND
> AS SOON AS POSSIBLE.  Thanks a million.

Make sure to #define INCL_BASE or INCL_SUB before you #include <os2.h>.  
This will include the old Kbd, Vio and Mou prototypes.
The exported names have changed to VIO16GETANSI, etc.

+-----------------------------------+-----------------------------------+
| Wayne Desmond                     | Happily using and working (read:  |
| OS/2 Consultant/Programmer        | earning a GOOD living) with       |
| (wayned.bbs@cybernet.cse.fau.edu) | OS/2, since version 1.1.          |
+-----------------------------------+-----------------------------------+
Xref: sparky comp.os.os2.programmer:4307 comp.lang.c:12491
From: db3l@ans.net (David Bolen)
Newsgroups: comp.os.os2.programmer,comp.lang.c
Subject: Re: malloc causes a segmentation violation!?
Date: 18 Aug 92 13:07:04 GMT
Organization: Advanced Network & Services, Inc. - Elmsford, NY

In article <1992Aug18.143135.6259@cc.tut.fi> mn87504@cs.tut.fi (Naatula Mika) writes:

>Sometimes my program causes a segmentation fault. If I drive it with
>CVP I can find out (from calls sequence) that the error was caused by
>malloc. To be exact, malloc calls an internal(?) function named
>_searchseg() that fails. Any ideas what this function might be?
>
>(...)
>
>My program uses a lot of dynamic memory allocation, but I am quite
>sure that there is no bugs in my code. I have spent two days checking
>out the memory allocation of this program.

I'd go back and spend some more time looking.  This very much sounds like
something in your program used and errant pointer and trashed some of the
memory control blocks used by the C compiler's memory allocation routines.
The program only dies when you next try to do a malloc and the C compiler
needs to scan for free space - the corrupted internal pointers cause the
trap.

Dynamic memory problems are very subtle and hard to track.  Two days might
only be a fraction of the time necessary to locate such a bug - I know I've
spent a significantly longer time tracking down such bugs in the past.

Some things that can help is to dump debugging output for every allocation
and free operation and ensure that everything matches.  Also - there are
some libraries around (I'm not positive where - maybe someone else can
help?) that replace the standard allocation calls, and set up signature
areas around the allocated memory to help you track down the piece of code
that is munging the wrong memory.

Alternatively, if you can somehow replicate a sequence of steps that causes
the problem (not always possible), then you can scrutinize the code path
that those steps take to see if you can find an uninitialized pointer, memory
used after freeing, fencepost errors (ie: going 1 past the end of an array),
etc..

Probably not what you wanted to hear - but I think you'll probably find the
root of this problem in your code somewhere...

--
-- 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    \
\-----------------------------------------------------------------------/
From: kevinc@aupair.cs.athabascau.ca (Kevin Crocker)
Newsgroups: comp.os.os2.programmer
Subject: HELP!!!! stupid me! need expert help to get back d:
Keywords: Urgent!
Date: 13 Aug 92 00:11:08 GMT


Hi all, well I've really screwed up this time.

I had to get my DOS boot drive working for the two remaining programs I
have that I can't run under OS/2. So, for the last two days I've been
running under DOS. I decided to optimize my D: drive (DOS 5.0 formatted
and FAT). In order for the disk organizer to work I renamed the "wp
root. sf" and "ea data. sf" files.

Now of course, OS/2 refuses to recognize any of the files on my D:
drive.

How can I rename the wp and ea files back to what they should be??????

God I feel stupid!

Kevin

P.S. This would not normally be a big problem except that I use D:
drive to store all my download files and only move things to C: drive
when I've totally debugged and am satisfied with a program. Thus, all
my software is on D: drive.
--
Kevin "autark" Crocker (Athabasca University)
kevinc@cs.AthabascaU.CA  -or-  risk@cs.AthabascaU.CA
Newsgroups: comp.os.os2.programmer
From: jsykes@dadd.ti.com (Jonathan Sykes)
Subject: Re: OS/2 2.0 LIB Format
Reply-To: jsykes@dadd.ti.com
Organization: Texas Instruments Inc
Date: Mon, 17 Aug 1992 15:04:58 GMT

In article 12351@pony.Ingres.COM, seg@Ingres.COM (scott e garfinkle) writes:
>In article <1992Aug13.175411.29093@csc.ti.com> jsykes@dadd.ti.com writes:
>>I've just received my copy of the OS/2 developers toolkit - unfortunately it
>>doesn't contain a LIB.EXE command. I am willing to write one if someone can
>>describe the format of the .LIB files? I'm planning to use the toolkit with
>>gcc/2.
>
>1) The toolkit does come with LIB -- it's just that it's in the workframe
>stuff.  Install workframe if only for the lib.
>
>2)  The LIB format is the same as it's always been.  Only the .OBJ files
>have changed somewhat.

Yes, IBM ship LIB.EXE with the workframe but the toolkit and workframe are
seperate products. I just have the toolkit - I don't need the workframe and
they both cost ~$80. I don't need the the Workset since I'm using the toolkit
just fine with gcc/2. All I'm missing is a LIB program, so I'm working on
writing one now - the format of a LIB in DOS and OS/2 are the same, the
object files are different but that doesn't concern me since gcc/2 creates
those just fine. I am having some problems understanding the hashing
algorithm used in the LIB dictionary. Does anyone know of a Public Domain DOS
LIB program with source? That would probably just need a recompile with
gcc/2.

---
           __o
           \<,
_________()/ ()_______________________________________________________________
Jon Sykes                                                   jsykes@dadd.ti.com
Design Automation Div.                                          (214) 997-2916
Texas Instruments Inc. Dallas, Tx.        

Xref: sparky comp.os.os2.programmer:4336 comp.lang.c:12548
From: chuckb@milton.u.washington.edu (Chuck Bass)
Newsgroups: comp.os.os2.programmer,comp.lang.c
Subject: Re: malloc causes a segmentation violation!?
Date: 20 Aug 92 01:55:22 GMT
Article-I.D.: milton.chuckb.714275722
Organization: University of Washington


>        For what it's worth, I got burned by getting internal errors in
>malloc() and free(), then finding out that the reason for those errors was that
>I was walking over memory that wasn't mine.  That experience made me a firm
>believer in user-defined heap management, even if it is something as simple as
>jacket routines (or macros) which control malloc and free.

>        The fact that the C spec permits implementations to provide a malloc
>that returns only NULL is another compelling reason for the programmer not to
>rely on directly calling malloc or free.

>        For portability and robustness, DON'T DIRECTLY USE malloc!


>-- 
>NOTE: I CAN'T SEND/RECEIVE E-MAIL HERE!!!  Use --> davisonj@ecn.purdue.edu <--
>      During (roughly) August 20-25, I will be in transit.  Please be patient.
>      The opinions and other information contained herein are not necessarily
>      representative of Northern Telecom or any of its subsidiaries. 

 
 I am wondering if this is common among people who program in C.
 I haven't been programing in multiple environments (TurboC and
 an SGI workstation only).  I write code that runs on both and
 do *lots* of dynamic memory allocation.  Is this a bad habit,
 terrible habit, good habit?  It seems to me that a general
 program should be able to adjust to the required size
 dynamically.  

 Anyhow your thoughts would be appreciated because I spent a lot
 of time figuring out how to make dynamic memory allocation work
 right... is this no longer in style?

 Later


Chuck Bass
College of Forest-Systems Engineering
University of Washington
chuckb@u.washington.edu
Newsgroups: comp.os.os2.programmer
From: eldenbrg@stortek.com (Dave Eldenburg)
Subject: Re: Where am I going wrong????
Organization: Storage Technology Corp.
Date: Mon, 17 Aug 1992 16:21:37 GMT

In article <1992Aug17.093809.24122@Informatik.TU-Muenchen.DE> rommel@Informatik.TU-Muenchen.DE (Kai-Uwe Rommel) writes:
>In article <1992Aug17.082023.13914@stortek.com> eldenbrg@stortek.com (Dave Eldenburg) writes:
>>
>>So, are you saying there is no way to get this info using an OS/2 2.0
>>call?  Is this IBM's way of telling us that the command line is
>>dead and all new systems should be designed for PM?  There are a lot of
>>applications that don't really need that kind of a user interface.
>>
>>Dave
>
>Yes it looks like this. Remember, if OS/2 is ported to a RISC, it would
>not have a concept like the PC screen buffer, so the VIO/MOU/KBD calls
>are useless.
>
>Part of the work can be done with 32-bit IOCtl calls, for the rest you
>have to call 16-bit API's on PC's.
>
>Kai Uwe Rommel

So, IBM says I should take all my fairly sophisticated command line
applications and convert then to PM.  Now because of the above mentioned
problems (i.e. RISC not having a concept of PC screen buffer or a mouse)
the OS/2 that ends up on another platform does not support PM.  I'm
looking at another major conversion just to get my code to run on the
very same operating system. And the conversion will probably be back
to the command line, at least till IBM get some other user interface
working.  And IBM says this is _better_???

I guess the days of programming for the least common denominator are
gone.  It also sounds like the days of the small time programmer are
numbered too, at least in the IBM environment.  I don't have the
resources to support a major conversion with every hardware platform
change.  And can you imagine the maintenance problems!?!?

Dave
Newsgroups: comp.os.os2.programmer
From: coates@newton.physics.uq.oz.au (Tony Coates)
Subject: Problem with EMX-0.8d
Keywords: emx g++ c++ test
Organization: Physics Dept. The University of Queensland
Date: Sat, 15 Aug 1992 05:25:29 GMT

I have just installed emx-0.8d (i.e. g++ for OS/2 v2.0), and tried to
make the files in the directory "\emx\test" using "make".  Everything
was O.K. until the compilation of the file "hexdump.c".  The compilation
terminated with the error "`optswchar' undeclared".  This "char"
variable is used without declaration in "hexdump.c".  A look at the code
suggested that "optswchar" should be declared in "getopts.h", but isn't.
A search of all files on the disk only found the string "optswchar" in
the files "hexdump.c" and "libc.a", which suggest that a declaration of
"optswchar" has been omitted somewhere.  Can anyone help me with this?
Thanks in advance for any help/advice.
								Tony.


From: Barry.King@ttlg.UUCP (Barry King)
Sender: TTLG@ttlg.UUCP
Newsgroups: comp.os.os2.programmer
Subject: SHORT, USHORT, and other absurdities
Date: 22 Aug 92  12:07:25 mst

In a msg on <Aug 22 01:36>, Walter Bright of 42:1000/2 writes:

 -> /MRESULT EXPENTRY ClientWndProc (
 -> /    HWND     hwnd,
 -> /    USHORT   msg,
 ->      ^^^^^^
 -> /    MPARAM   mp1,
 -> /    MPARAM   mp2)

 -> I've never understood this strange urge to #define the basic 
 -> types. Is anyone out there using a compiler where USHORT 
 -> would be anything other than "unsigned short"? How about SHORT 
 -> being anything other than short, or LONG being anything other 
 -> than long?

I guess I agree, mostly, but I do find it useful in that it takes less typing and 'fits in' with the general appearance of the rest of the types - they are all upper case...this is, I recognize, a personal asthetic kind of thing and comes from habit and indoctrination and no sound technical reason in this case.

 -> They remind me of the old practice (now discredited, after being 
 -> discovered to be useless) of:
 -> 	#define BEGIN {
 -> 	#define END   }

This is just plain silly.  If someone wants BEGIN...END in their code, use Pascal...

 -> These silly typedefs create a useless layer of obfuscation and 
 -> another potential source of error (I always have to check if 
 -> SHORT really was short!)

Is this really a factor?  I've only ever had to do this when IBM or MS released a new version of their toolkits... ;-)

 -> Another brain-dead one is:
 -> 	#define FAR far
 -> The argument I hear is that on systems without far, you can just 
 -> do: 	#define FAR
 -> and it goes away! True, but why cannot one do:
 -> 	#define far
 -> and achieve just as much portability?

 -> (P.S. I have running code that compiles and runs on 16 bit DOS, 
 -> 32 bit DOS, 16 and 32 bit OS/2, Windows, Windows NT and 68000
 ->  Macintoshes. Never have I needed those aliases for the basic 
 -> types.)

Agreed.  Again, it is just a matter of asthetics for the simple types, IMNSHO.

Regards,
 
Barry

 * Origin: The OS/2 Connection - Edmonton, Alberta, Canada (42:100/31)
Newsgroups: comp.os.os2.programmer
From: lmorris@mdd.comm.mot.com (Larry Morris)
Subject: Re: Question and problem with GCC/2
Organization: Motorola, Mobile Data Division - Seattle, WA
Distribution: na
Date: Thu, 20 Aug 1992 01:05:31 GMT

In <1992Aug19.212328.15304@talon.ucs.orst.edu> hilmera@ucs.orst.edu (Andrew Hilmer) writes:

>Compiler: gcc/2 2.1
>Problem: problem and question about gcc/2

...

>/*
>  This program takes the input of two numbers, one
>  integer, one floating point, and prints them back out.
>*/

>#include <stdio.h>

>main()
>{
>  int x;
>  float y;

>/*  fflush(stdin); */
>  printf("This is my first C program.\n");
>  printf("Enter an integer: ");
>  scanf("%d", &x);
>  printf("Enter a floating point number: ");
>  scanf("%f", &y);
>  printf("The value stored in x is %d\n", x);
>  printf("The value stored in y is %f\n", y);
>}

...

>When run, it prints nothing but a line or two and a blinking cursor.
>As a shot in the dark, I entered 3, hit enter (got another big
>nothing), then entered 93.9 and hit enter.

Read  the FAQ.  Nothing says when stdout will flush unless you specify it.
The program did exactly as requested. 
    printf() some stuff   --  it gets buffered to stdout
    scanf() some stuff    --  you typed 3
    printf() some more    --  stdout buffers some more
    scanf() some more     --  you typed 93.9
    exit()		-- stdout gets flushed at exit and you see the printfs()

If you want to handle the flushes yourself, just fflush(stdout)  before each
of the scanfs().  Takes full advantage of any buffering and gets you exactly
what you want.


-- 
Internet:    <lmorris@mdd.comm.mot.COM>   |  Larry Morris
 ...uw-beaver!sunup-----\                 |  Motorola/Mobile Data Division
 ...uunet-----------------!mdisea!lmorris |  19807 North Creek Parkway
 ...van-bc!mdivax1------/                 |  Bothell, WA  (206) 487-5810
From: andy@huey.Jpl.Nasa.Gov (Andy Poulsen)
Newsgroups: comp.os.os2.programmer
Subject: tcsh for os2?
Keywords: unix xwindows shell
Date: 13 Aug 92 16:42:59 GMT
Organization: Spatial Interferometry Group, JPL

why can't tcsh be compiled for os/2?  the sources are freely available,
and from what i've heard the emx port should allow fairly easy porting.
it'd be a welcome addition, i think (and free, at that...)

anyone, anyone?

thanks,

andy


-- 
andy poulsen                   *
jpl 169-214/pasadena, ca 91109 *      we engineers have a saying:  
(818) 354-8033                 *
andy@huey.jpl.nasa.gov         *    we may be dumb, but we're slow...
From: "robert fielder" <robert.fielder@canrem.com>
Newsgroups: comp.os.os2.programmer
Subject: un:hard disk interrup
Date: 12 Aug 92 17:04:48 EST
Reply-To: "robert fielder" <robert.fielder@canrem.com>
Distribution: comp
Organization: Canada Remote Systems

Larry A. Shurr (shurr@cbnews.cb.att.com) said:
LA>I did find that OS/2 didn't like something about the UltraStore's
LA>track mapping for drives with > 1024 tracks, but that's a different
LA>issue.

Larry:

I have a Fujitsu 670 Mb drive with well over 1024 tracks, and an
Ultrastor 12c controller.

No problems so far, but your message leaves me concerned:

What problems did you notice?

Robert

Entered on Wed  08-12-1992  15:39:11 from Brampton, Ontario, Canada
---
  DeLuxe 1.21 #502  Systems run SO MUCH better with the users OFF!
--
Canada Remote Systems  - Toronto, Ontario/Detroit, MI
World's Largest PCBOARD System - 416-629-7000/629-7044
Newsgroups: comp.os.os2.programmer
Subject: Dialog Editor. How to create a Notebook?
From: John_Huttley@kcbbs.gen.nz (John Huttley)
Date: 16 Aug 92 18:03:26 GMT
Organization: Kappa Crucis Unix BBS, Auckland, New Zealand

I have been experimenting with the dialog editor, attempting to create a
notebook. The editor does not seem to permit the creation of multiple
pages and index tabs. 

Obviously it is possible, but how?

The OL help is no help at all. Any feedback gratefully accepted.


Newsgroups: comp.os.os2.programmer
From: terryfry@access.digex.com (Terry Fry)
Subject: Re: Compute-intensive performance in WIN-OS2
Organization: Express Access Online Communications, Greenbelt, Maryland USA
Date: Mon, 17 Aug 1992 19:48:10 GMT

In article <4591@arccs1.fed.FRB.GOV> m1phm02@fed.frb.gov (Patrick H. McAllister) writes:
>
>By the way, the same calculation done in a 16-bit native OS/2 port runs in about 7 sec. It seems to me that if vendors of compute-intensive software were able to get the same kind of speed-up with native OS/2 applications, it would have a big effect on the Windows vs. OS/2 controversy, whereas relying on WIN-OS2 emulation for the same programs may have the opposite effect. 
>
>I would like to see of we can have some discussion here on the architectural features of these operating environments that produce such dramatic speed differences. At first glance, it would seem that, if any kind of code should display about the same speed under these different environments, it would be a small, floating point-intensive computation like this. 


I am assuming that the 16bit native OS/2 port was running under 1.3 when
it was tested for speed.  If this is so, it may point to the amount
of tiling going on for converting the Win-OS/2 session onto the flat
plane structure.  IBM calls those "thunks" and I assume they apply
to Win Apps under 2.0 as well as 1.3 apps under 2.0



Newsgroups: comp.os.os2.programmer
From: smbrush@lims01.lerc.nasa.gov (Andy Brush @Sverdrup)
Subject: DosExecPgm Args Question
News-Software: VAX/VMS VNEWS 1.41    
Organization: NASA Lewis Research Center
Date: 13 Aug 1992 08:15 EST  

I'm trying to DosExecPgm a program that requires command-line switches.  
The docs say that these args are placed in a "pointer to zero-terminated 
string*s*", and passed to the function.

Well, that arg to DosExecPGm is typedef'ed as "char *PSZ", so I'm a little 
lost on how it points to more than one string.  I have tried a few of what 
I thought were possibilities, but no luck.

Will someone post a code fragment which shows the correct way to load the 
argument string for DosExecPgm?

Thanks in advance.

Andrew S. Brush             | SMBRUSH@LIMS01.lerc.nasa.gov
Sverdrup Technology         | 2001 Aerospace Parkway
NASA LeRC Group             | Brook Park, OH 44142
"Opinions are Mine, Only"   | (216) 826-6770
From: ameline@vnet.ibm.com (Ian Ameline)
Date: Thu, 20 Aug 92 12:41:31 EDT
Subject: C Set/2
Newsgroups: comp.os.os2.programmer
Organization: C-Set/2 Development, IBM Canada Lab.
Disclaimer: This posting represents the poster's views, not those of IBM

In article <1992Aug19.203811.15056@natinst.com>,
uma@natinst.com (Uma Arunkumar) writes:
>
>       1. error EDC0227 : The return types of the functionm pointers are incompatible.
>       2. informational EDC0140: Operand has type pointer to _Optlink function returning signed short integer.
>       3. informational EDC0140: Operand has type _Optlink function returning signed short integer.
>
>       WHAT DOES THIS MEAN?
>       How should I initialize a table with function pointers?
>       In MSC 6.0, the function name evaluates into pointer expression.
>       How about C Set/2?
>       What is wrong in the above code?
>
>I WOULD HIGHLY APPRECIATE SOME HELP.
>

   If you could send a .c file which will cause those errors to be
generated to cset2@vnet.ibm.com , We'd be happy to look into it, and
find out why this is happening.

Regards,
Ian.
Xref: sparky comp.os.os2.programmer:4203 comp.os.os2.advocacy:3897