HDTenEightyP/NetNews huggingface dataset:
From: dmm@vnet.ibm.com (dave)
Date: Thu, 20 Aug 92 13:43:25 EDT
Newsgroups: comp.os.os2.programmer,comp.os.os2.misc
Subject: Re: C Set/2
Organization: IBM Canada Lab
News-Software: UReply 3.0
X-X-From: dmm@vnet.ibm.com (Dave Mooney)

In <1992Aug19.203811.15056@natinst.com> Uma Arunkumar writes:
> (restructured a bit -- dmm)
>
>   struct {
>          short a;
>          short b;
>          short (* fun_name)();
>   } command;
>
>   extern short Test1(short p, short q, short r);
>   extern short Test2(short x, short y);
>
>   commands cmd_array[] = {
>                              {1,    2,   Test1}
>                              {3,    4,   Test2}
>   };
>
>   icc /c /w3 /o+ prog1.c prog1a.h prog1b.h
>
>       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.

First of all, the error message is lying to you.  It's not the return
types of the function pointers which are incompatible -- it's the
parameter lists.  Your example can be chopped down to:

  int f(short);
  int (*fp)();

  fp = f;

For two function pointers to be compatible, their parameters lists must
be compatible.  If one of the parameter lists is empty and one isn't, all
the parameters in the non-empty list must be wide types (ie, not char,
short, or float).  All the gory details are in section 3.5.4.3 of the
ANSI C Standard, but the upshot is that a function with a short parameter
is not compatible with a function pointer with no parameters.

We are easing up on this restriction in our next release (for the benefit
of people like you, whose code suddenly stops working), but in the mean
time, you can get around this problem by sticking in explicit casts on
the assignments:

  typedef short (* fptype)();

  typedef struct {
         short a;
         short b;
         fptype fun_name;
  } command;

  extern short Test1(short p, short q, short r);
  extern short Test2(short x, short y);

  command cmd_array[] = {
                             {1,    2,   (fptype)Test1},
                             {3,    4,   (fptype)Test2}
  };

dave

-------------------------------------------------------------------------
Dave Mooney                                              dmm@vnet.ibm.com
 C Set/2 Development, IBM Canada Lab, 844 Don Mills Rd, Toronto, Ontario
            "If you've got a blacklist, I want to be on it"
From: it1@ra.msstate.edu (Tim Tsai)
Newsgroups: comp.os.os2.programmer
Subject: Re: Hard Disk Interrupts?
Date: 21 Aug 92 02:54:27 GMT
Organization: Mississippi State University

shurr@cbnews.cb.att.com (larry.a.shurr) writes:
>In article <1992Jul27.004154.18282@mcshh.Hanse.DE> chk@mcshh.Hanse.DE (Christian Kuhtz) writes:
>>how is it with RLL/MFM controllers and ESDI ? Same behaviour ?

>Christian,

>I have not noticed any problem with comm interrupts being blocked too
>long with neither UltraStore 12f nor WD1007A-WA2 ESDI controllers.

  I have tried an Ultrastor 14F and was unable to transfer at
high speeds (the 14F was holding the dma channel too long).
This probably depends on the motherboard, BIOS, etc though.

-- 
  Sometimes I think the surest sign that intelligent life exists elsewhere
  in the universe is that none of it has tried to contact us. <Calvin>
Organization: Sophomore, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA
Newsgroups: comp.os.os2.programmer
Date: Sat, 22 Aug 1992 21:33:04 -0400 
From: "Stephen M. Lacy" <sl31+@andrew.cmu.edu>
Subject: WHERE IS AVIO!!!!!!


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.

Steve


"Please, stay misunderstood." -The Hollow Men

Newsgroups: comp.os.os2.programmer
From: matcsp@nuscc.nus.sg (Chan Shih-Ping)
Subject: Bug in the WATCOM 9.0 preprocessor?
Organization: National University of Singapore
Date: Mon, 17 Aug 1992 01:41:31 GMT

Is this a bug in the WATCOM 9.0 preprocessor?

/* Input file test.c */


#define A	AA
#define g(x, y)	x ## y
#define gg(x)	g(x, A)

extern g(B, A)();
extern gg(B) ();

/* End of test.c */

Output of preprocessing phase:

WATCOM C 386 Compile and Link Utility Version 9.0
Copyright by WATCOM Systems Inc. 1988, 1992.  All rights reserved.
WATCOM is a trademark of WATCOM Systems Inc.
       wcc386 test.c  /p

extern  BA();
extern  BAA ();  <----- Isn't this wrong? Shouldn't it be BA ();

Newsgroups: comp.os.os2.programmer
From: ochealth@unixg.ubc.ca (ochealth)
Subject: Re: tcsh for os2?
Keywords: unix xwindows shell
Organization: University of British Columbia, Vancouver, B.C., Canada
Date: Fri, 14 Aug 1992 07:01:54 GMT

In article <1992Aug13.164259.10345@jato.jpl.nasa.gov> andy@huey.Jpl.Nasa.Gov (Andy Poulsen) writes:
>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?
 go for it! Nice of you to offer!

seriously, I think tcsh uses a lot of UNIX system calls, and while OS/2
can handle the same kind of things UNIX can, OS/2 does things in a totally
different way. I think fork() is one critical call that OS/2 doesn't have
directly, so someone is probably working on providing equivalent calls.

THEN we might see a 2nd wave of UNIX programs, like tcsh etc.


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


-- 
______________________________________________________________________________
jpm: ochealth@unixg.ubc.ca         
                            Happily using OS/2 2.0 because MS Windows isNT ___
                                                      Insert VapourFeature ^^^
Xref: sparky comp.os.os2.programmer:4344 comp.lang.c:12572
From: rommel@Informatik.TU-Muenchen.DE (Kai-Uwe Rommel)
Newsgroups: comp.os.os2.programmer,comp.lang.c
Subject: Re: malloc causes a segmentation violation!?
Date: 20 Aug 92 14:09:45 GMT
Organization: Technische Universitaet Muenchen, Germany

In article <1992Aug20.092700.8373@wsl.ie> jja@wsl.ie (John J. Allen) writes:
>harris@garfield.catt.ncsu.edu (Michael Harris) writes:
>: Memory protection in OS/2 protects one process from another... not a process
>: from itself.
>
>OS/2 2.0 = Flat memory model
>OS/2 1.x = Segmented memory model.
>
>The segmented memory model had some advantages over the flat model. If I
>used DosAllocSeg() to create a 20k block and then ran off the end of
>it I'd get a segmentation violation as soon as I did that. (As in Win 3.x)
>
>So although the FLAT memory model simplifies programming it hampers
>debugging.

This is not entirely true. To make it similar, some programming would be
needed, however.

One could implement a malloc() and friends library which does not only
allocate memory in the usual manner but also two additional pages, one
before and one after some chunk of memory. These pages should then be
set up as "guard pages", this means, that any access to these pages
triggers an exception. A handler set up for this exception could then
write an entry to a log file and abort the program.

This method has the advantage over the 1.x segmented model that it is
not restricted to whole segments but it is still restricted to 4k
granularity (page size). Of course, it wastes memory too, but this
should not matter for a development cycle.

Note: I have not implemented such a library, but the memory management
API in OS/2 2.0 can be used to implement such a debugging aid, according
to the documentation.

Kai Uwe Rommel

/* Kai Uwe Rommel --- rommel@informatik.tu-muenchen.de */

DOS ... is still a real mode only non-reentrant interrupt
handler, and always will be.                -Russell Williams
Newsgroups: comp.os.os2.programmer
Subject: The workframe is out to get me.
From: Dan Karipides <DK6TOPER@MIAMIU.BITNET>
Date: Wednesday, 12 Aug 1992 10:47:21 EDT
Organization: Miami University - Academic Computer Service

I'm just getting use to using the Workframe that comes with CSet/2.
Everything SEEMS nice, but I'm finding some things in the Workframe
are counter-intuative.  Some problems and related questions:
 
(1) Say I'm editing a file in a open project; call it main.c.  I then switch
    to the PM helpbook to find info on a WinFunction.  I return to the
    workframe but my editor window is now hidden.  So I click on the main.c
    line of my open project.  Workframe fires up another copy of the
    editor that is editing the old version of main.c.  The fastest way I've
    found of bringing back the "real" main.c is to find some visible desktop,
    do a MB1&MB2 and bring up the tasklist.  This can't be the expected way
    to do this.  Any suggestions?
 
(2) And a followup to #1.  Is there any easy way to switch between the
    Workframe and a help window?  The best way I've found is to have
    the workframe about one pel from the left edge of the screen.  I then
    put the help window all the way to the left.  By pushing the mouse all
    the way to the left, I can switch to the help window.  There is usually
    enough of the Workframe visible to switch back.  Again, is this how
    the Workframe was designed or am I missing something obvious?
 
 
Thanks in advance.
 
                                                         -Dan
From: dic5340@hertz.njit.edu (David Charlap)
Newsgroups: comp.os.os2.programmer
Subject: Re: Where am I going wrong????
Date: 17 Aug 92 19:02:09 GMT
Organization: New Jersey Institute of Technology, Newark, N.J.

In article <1992Aug17.093809.24122@Informatik.TU-Muenchen.DE> rommel@Informatik.TU-Muenchen.DE (Kai-Uwe Rommel) writes:
>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.

This is the way it's done under Unix and other systems, as well.
That's why some enterprising programmers wrote the curses package.  I
wonder when this'll be ported to OS/2.


-- 
   |)  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: dic5340@hertz.njit.edu (David Charlap)
Newsgroups: comp.os.os2.programmer
Subject: Re: GCC 2.2.2 doesn't compile
Date: 19 Aug 92 20:44:50 GMT
Organization: New Jersey Institute of Technology, Newark, N.J.

In article <1992Aug19.141813.15618@rz.uni-karlsruhe.de> ralf@ubka.uni-karlsruhe.de (Ralf Grohmann) writes:
>Hi!
>
>I've installed the new version of gcc, but when I try
>to make the samples, all I get is an 
>'abnormal programm termination' error from gcc.
>
>Even if I type 'gcc -c sample1.c' the same thing happens.
>What am I doing wrong? 

Are your environment variables set up properly.  You should have four
include-type variables, and a few others.  I think there are a total
of seven environment variables for gcc.  Note that some use forward
slashes for paths (like Unix) and that some use backslashes (like
DOS), and that they can't be mixed up.

The README file for gcc explains this.
-- 
   |)  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: dic5340@hertz.njit.edu (David Charlap)
Newsgroups: comp.os.os2.programmer
Subject: Re: Specifying little icon for system menu
Date: 18 Aug 92 17:59:07 GMT
Organization: New Jersey Institute of Technology, Newark, N.J.

In article <009mmwp.jeffc@netcom.com> jeffc@netcom.com (Jeff Cohen) writes:
>The mini-icons are black&white device-independent bitmaps, 16x16 for VGA and
>20x20 for 8514/A.  The Icon Editor can create these as well.  

Note that they must be 2-color.  The only colors used by these icons
are solid, and hollow.  All solid colors come out black, and all
hollow colors come out in the same color as the menu background.

This is odd, since a 32x32 (or 40x40) icon, scaled to the box, will
come out in full color.  But a full-color 16x60 (or 20x20) icon comes
out black.



-- 
   |)  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: mark@snark.itc.gu.edu.au (Mark Hessling)
Subject: Curses Libraries for OS/2 (was - Re: Where am I going wrong????)
Organization: ITC, Griffith University, Brisbane, Australia
Date: 18 Aug 92 22:16:46 GMT

soh3@quads.uchicago.edu (min-woong sohn) writes:

>In article <1992Aug17.190209.8650@njitgw.njit.edu> dic5340@hertz.njit.edu (David Charlap) writes:
>>
>>This is the way it's done under Unix and other systems, as well.
>>That's why some enterprising programmers wrote the curses package.  I
>>wonder when this'll be ported to OS/2.
>>

>BSD curses package is already ported to OS/2 2.0 by Kai about
>a month ago.  It's part of g++ he ported but you can use it with C
>without any problem.  It just works fine.  It is included in a
>g++ library file, whose name I forgot.  But the file size seems
>to be above 1.2 meg.  It is under /pub/os2/2.0/programmer (correct me).

>Min


Although not yet 'officially' announced, a beta version of PDCurses 2.0 is
available for anon ftp. This library is an almost complete rewrite of the
original PCCurses 1.4, by Bjorn Larrson. PDCurses is System V based,
supports pads, color etc. The library works on DOS and OS/2. Work is
currently underway to compile with emx and/or gcc/2. PDCurses is public
domain code.

You can ftp the source from:

 accord.dciem.dnd.ca  (192.16.207.25)

 in /pub/curses/pdcurses

If you have any problems or bug fixes, let me know.

Cheers, Mark
------------------------------------------------------------------------
Mark Hessling                         Email: mark@snark.itc.gu.edu.au
DBA,ITS                               Phone: +617 875 7691
Griffith University                   Fax:   +617 875 7877
Nathan, Brisbane QLD 4111 Australia   *** PDCurses Maintainer ***
------------------------------------------------------------------------
Newsgroups: comp.os.os2.programmer
From: feustel@netcom.com (David Feustel)
Subject: Help with os/2 v2.0 comm ioctls needed
Date: Mon, 17 Aug 92 01:13:27 GMT
Organization: DAFCO: OS/2 Software Support & Consulting

I'm trying to initialize the com2 port with DosDevIOCtl calls.
I keep getting error 87 - invalid parameter but I don't spot the
error.

Can someone send me an example of the ioctl calls
- initializing the baud rate,
- setting the line parameters (data bits, parity and stop bits)
- setting the modem control bits?

The tech library documentation is pretty skimpy on this topic.

Thanks.
-- 
Dave Feustel N9MYI <feustel@netcom.com>
---
Given Civil Seizure, from the DEA's point of view, winning the War on
Drugs would be killing the Goose that lays golden eggs.

It's also hard to tell which group is up to more no-good: cops or
crooks.
Newsgroups: comp.os.os2.programmer
From: eengelke@steam.uwaterloo.ca (Erick Engelke)
Subject: Re: The workframe is out to get me.
Organization: University of Waterloo
Date: Wed, 12 Aug 1992 21:24:02 GMT

>I'm just getting use to using the Workframe that comes with CSet/2.
>Everything SEEMS nice, but I'm finding some things in the Workframe
>are counter-intuative.  Some problems and related questions:

Sorry if this is a FAQ, but I haven't seen this topic since I
joined a few days ago.  What's the ETA on Borland C++ for OS/2?

Erick

-- 
Erick Engelke					  Engineering Computing
						 University of Waterloo
Waterloo TCP Architect		 erick@development.watstar.uwaterloo.ca
Newsgroups: comp.os.os2.programmer
From: jsykes@dadd.ti.com (Jonathan Sykes)
Subject: Re: Using Toolkit with GCC - Any problems?
Reply-To: jsykes@dadd.ti.com
Organization: Texas Instruments Inc
Date: Tue, 18 Aug 1992 15:13:42 GMT

Can't you avoid adding the 'asm ("x")'s by including os.h as follows:

extern "C" {
#include <os2.h>
}

I admit I haven't built an exec with the changes in place yet but it might be
an easier way. I also found I had to remove the _Seg16, _Far etc directives
just to get GCC/2 to parse the headers - I plan on using the 16bit calls with
the 16_to_32 package on hobbes so these edit's shouldn't have any affect
other than keeping the compiler happy.

I will be uploading an OS/2 library dumper at the end of this week - it's my
first step towards writing a Public Domain library program. If anybody knows
of a DOS PD Lib program with source that I can leverage off please let me
know. Right now I have limited information on the hashing algorithm used in
the library dictionary, once I figure that out a LIB.EXE will be on hobbes.
Anyone at MS or IBM care to volunteer the algorithm used with a C-code
example (I already have a pseudo code example which gives me weird values).

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

Xref: sparky comp.os.os2.programmer:4342 comp.os.os2.misc:27796
From: rovero@oc.nps.navy.mil (Josh Rovero)
Newsgroups: comp.os.os2.programmer,comp.os.os2.misc
Subject: Re: GNU Plot (faster version ....)
Date: 20 Aug 92 04:27:01 GMT
Distribution: comp.os.os2.programmer
Organization: Naval Postgraduate School, Monterey CA

Go to any FTP site that has any version of GnuPlot (other than the OS/2 one)

The Amiga, Unix, and PC versions all have a demo subdirectory with a 
bunch of linked demos.  Just type this at the GnuPlot prompt:

cd 'demo'
load 'all.demo'

and follow the directions.  Then read all the .demo and .dat files.
The other thing to do is use the built in help facility.  Just type
help at the prompt.

-- 
Josh Rovero   (rovero@oc.nps.navy.mil) | or Internet 5346p@cc.nps.navy.mil 
Department of Oceanography, Code OC/Rv |      Bitnet 5346p@NAVPGS 
Naval Postgraduate School              |              
Monterey, CA  93943   (408) 646-2084   |
Newsgroups: comp.os.os2.programmer
From: gkm@cbnewsh.cb.att.com (gary.k.mc nees)
Subject: Does Long Double Work With Math Function?
Organization: AT&T
Distribution: usa
Date: Wed, 19 Aug 1992 21:01:32 GMT


Does the C Set/2 compiler support long double math operations?
I tried a simple power calculation which should have resulted 
in an answer with an exponent of 400 and the program never 
finished. The reference specifies (double) but I thought that
long doubles were supposed to be supported.

Any help will be appriciated, Gary McNees
Newsgroups: comp.os.os2.programmer
From: harris@garfield.catt.ncsu.edu (Michael Harris)
Subject: Re: Dialog Editor. How to create a Notebook?
Organization: North Carolina State University
Date: Wed, 19 Aug 1992 00:07:14 GMT

John_Huttley@kcbbs.gen.nz (John Huttley) writes:

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

You can't create multiple pages in the dialog editor.  You add the pages via
api calls.

Basically, you need to create a dialog for each page and then send a message
to the notebook control associating each dialog with a page.
______________________________________________________________________________
     Michael Harris - harris@catt.ncsu.edu or harris@carvm3.vnet.ibm.com
 System Administrator, Computer & Technologies Theme Program, NC State Univ.
(My opinions are my own and do not represent those of NCSU or IBM Corporation)
From: "robert fielder" <robert.fielder@canrem.com>
Newsgroups: comp.os.os2.programmer
Subject: un:hard disk interrup
Date: 16 Aug 92 19:12:47 EST
Reply-To: "robert fielder" <robert.fielder@canrem.com>
Distribution: comp
Organization: Canada Remote Systems


In article <1992Aug14.185903.11252@cbnews> larry a shurr
<shurr@cbnews.cb.att.com> said:

LA>It's entirely likely that I just didn't set the options right on the board.

Larry:

If you want, I will send you a copy of my setup for my hard disk.  I
have an Ultrastor 12c caching controller.

The config for my Fujitsu 670 disk is different for OS/2 1.3 than for
2.0, but I was not thinking about changing this when I first received
OS/2 2.0 LA in Jan of this year, and ended up re-installing _MANY_
times before I clued in.

Robert

Entered on Sun  08-16-1992  17:22:31 from Brampton, Ontario, Canada
---
  DeLuxe 1.21 #502  I find push buttons very depressing......
--
Canada Remote Systems  - Toronto, Ontario/Detroit, MI
World's Largest PCBOARD System - 416-629-7000/629-7044
Newsgroups: comp.os.os2.programmer
From: linville@garfield.catt.ncsu.edu (John W. Linville)
Subject: Re: Where am I going wrong????
Organization: Computer and Technologies Theme Program, NCSU, Raleigh
Date: Mon, 17 Aug 1992 21:16:39 GMT

In article <1992Aug17.190209.8650@njitgw.njit.edu> dic5340@hertz.njit.edu (David Charlap) writes:

>This is the way it's done under Unix and other systems, as well.
>That's why some enterprising programmers wrote the curses package.  I
>wonder when this'll be ported to OS/2.

There is a port of curses available from ftp-os2.nmsu.edu as curs13-2.zoo under
/pub/os2/1.x/programming.  I am trying to compile it now, using C Set/2.

John W. Linville



----------------------------------------------------------------------------
|  John W. Linville                Amateur radio:  KD4KHC                  |
|  #include "std_disclaimer.h"     E-mail:  linville@catt.ncsu.edu         |
----------------------------------------------------------------------------
Newsgroups: comp.os.os2.programmer
From: bk230@cleveland.Freenet.Edu (Kin Lau)
Subject: GCC Graphics
Reply-To: bk230@cleveland.Freenet.Edu
Organization: Case Western Reserve University, Cleveland, OH (USA)
Date: Thu, 20 Aug 92 23:32:56 GMT


I have just installed GCC for OS/2. When I look up
the header files, I can't find a header file that
supports graphics (i.e. "GRAPHICS.H"). Is GCC
for OS/2 capable for handling graphics? If it does,
are there graphics functions (like putpixel, getpixel,
rectangle, ellipse, ...)? Thanks in advance.
Newsgroups: comp.os.os2.programmer,comp.lang.c
From: amorgan@Xenon.Stanford.EDU (Crunchy Frog)
Subject: Re: malloc causes a segmentation violation!?
Organization: Computer Science Department, Stanford University.
Date: Tue, 18 Aug 1992 17:14:40 GMT

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

>I wonder if this is a familiar bug to someone.

*All* bugs are familiar to me.  Solutions are harder.

>The problem is:
>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?

I had this problem before on another machine.  It turned out what
I was doing was malloc'ing space that was too small, overrunning it
and causing malloc to have a hissy fit.  I know you said you have
checked your code, but I would look for a line like

	fred = (grumble *) malloc(sizeof(grumble *));

which should be

	fred = (grumble *) malloc (sizeof(grumble));

Typedefs could compllicate this search.  Good luck.

C Frog
Newsgroups: comp.os.os2.programmer