HDTenEightyP/NetNews huggingface dataset:
From: cjensen@ampex.com (Colin Jensen)
Subject: Re: DosExecPgm Args Question
Organization: Ampex Corporation, Redwood City CA
Date: Thu, 13 Aug 1992 20:51:19 GMT

In article <19920813.054753.507@almaden.ibm.com> fattire@vnet.ibm.com (BJ Hargrave) writes:
>In <13AUG199208152210@lims01.lerc.nasa.gov> Andy Brush @Sverdrup writes:
>>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.
>
>PSZ buff = "C:\\OS2\\CMD.EXE\0/C Echo Hello!";
>
>rc = DosExecPgm ( NULL,                 /* Object name buffer         */
>                  0,                    /* len of object name buffer  */
>                  EXEC_SYNC,            /* execute synchronously      */
>                  buff,                 /* arguments                  */
>                  NULL,                 /* environment                */
>                  (PRESULTCODES)&exec_rc,       /* return codes       */
>                  buff );               /* program to execute         */
>
>Notice the \0 after the program name. The last argument to DosExecPgm
>uses the first SZ from buff for the program name and 4th argument to
>DosExecPgm uses the first SZ as argv<0> and the second SZ as the
>arguments to the program!

Unless I'm confused [common occurance :-)], that should really be

    PSZ buff = "C:\\OS2\\CMD.EXE\0/C Echo Hello!\0";

[note the extra \0 at the end of the string]

I.e. the arguments are laid out contiguously in memory separated by '\0'.
Two '\0' characters are used to mark the end of the argument list.

Corrections?
-- 
Colin Jensen (cjensen@ampex.com)
Newsgroups: comp.os.os2.programmer
From: ekl@fics.uucp
Subject: Using fonts in several windows
Organization: Kvam data as
Date: Sun, 16 Aug 1992 23:06:14 GMT

In a PM program I am working on, I need to use a font in several
windows.

Is there any way I can use WinCreateLogFont *once* for my entire
application, and then use a lLcid (local id) for all my windows?

Or, do I have to use WinCreateLogFont once per window? (Which I
don't want to, but...)

Any help is, of course, much appreciated.

Eirik Lygre
Kvam data as

ekl@fics.uucp
Newsgroups: comp.os.os2.programmer
From: BAETZLER@IRAV17.ira.uka.de (T.Baetzler)
Subject: Printing in OS/2
Organization: University of Karlsruhe (FRG)
Date: Fri, 21 Aug 1992 08:33:41 GMT
X-News-Reader: VMS NEWS 1.24


Please consider the following problem: I would like to print a color graphics
screen. Unfortunately, this is not a presentation space, but some lobotomized
construct which was constructed by HALO calls. The device context thing is
definitely not the solution I'm after.

However, I can save the screen in *.pcx format. What I would like to do is to
convert this to a *.pif file, and then print it using the PicPrint() call.

Now for the real problem: What is this mysterious *.pif? Yes, HELP tells me
that it spells Picture Interchange Format, and all the PIF Index entries refer
me to some factoid that tells me essentially the things I know already, but
ther is nowhere a format description of that mysterious PIF Format.

Could anybody please point me to a description of this format, or suggest a
better method for printing a HALO screen via PM (i.e., an undocumented
DoHardCopy Call ;-) )

Any help greatly appreciated!

Thomas

------------------------------------------------------------------------------
Thomas B\"atzler // BAETZLER@IRAV17.IRA.UKA.DE //   ``Yes, it's an Amiga!'' 
Newsgroups: comp.os.os2.programmer
From: mss2696@tamsun.tamu.edu (Mark Saum)
Subject: Re: TCP/IP Socket library for OS/2?
Organization: Texas A&M University, College Station
Date: Wed, 12 Aug 1992 17:07:53 GMT

In article <1992Aug12.055518.14954@news.columbia.edu> mig@cunixb.cc.columbia.edu (Meir I Green) writes:
>>In article <GHENNIGA.92Aug11153538@ampere.ampere> ghenniga@NMSU.Edu writes:
>>>
>>>I remember someone mentioning that they were writing a PD socket library for
>>>OS/2 2.0 and IBM's TCP/IP 1.2(1). Any new news on a release date for this?
>>>I really hate having to log in to a Unix machine to use gnus to read news
>>>and I think the tcp.c file gnus uses is very simple and a socket library for
>>>OS/2 would allow me to port it to the OS/2 port of GNU Emacs!


>In article <1992Aug12.054918.20154@tamsun.tamu.edu> mss2696@tamsun.tamu.edu (Mark Saum) writes:
>>I've got IBM TCP/IP v1.1 and it comes with socket libraries in the base 
>>package.  What more were you looking for? 

>Yes; but how much does this cost!? :-(

Aparently a lot.  IBM wants $250 just to upgrade from v1.1 to v1.2!!

>>Also, TCP/IP v1.2 comes with a newsreader application.

>A "sample application"!

Yeah, that's what I heard.  What does this mean??  Does it mean it doesn't
work all that well?

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Mark Saum                             |                    Texas A&M University 
Senior BANA/MIS Major                 |                  College Station, Texas
mss2696@tamsun.tamu.edu               |       Programmer, Department of Physics 
Newsgroups: comp.os.os2.programmer
From: bergstro@src.honeywell.com (Pete Bergstrom)
Subject: Re: Where am I going wrong????
To: comp.os.os2.programmer
Posted-Date: Mon, 17 Aug 92 12: 41:43 CDT
Organization: Honeywell Systems & Research Center
Date: Mon, 17 Aug 1992 17:41:43 GMT
Received-Date: Mon, 17 Aug 92 12: 41:44 CDT

eldenbrg@stortek.com (Dave Eldenburg) wrote:

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

Do you actually believe this or are you just being contrary?  The PC
screen buffer discussed here is the text mode buffer that everyone
since msdog days has directly written into. 

>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_???

Pure B.S. - the programming model for OS/2 & PM is higher-level than
what you've done before.  The API will be the same on other platforms
(if they ever want to do that - expect 100 million OS/2 capable PCs
(386/486/P5/etc) to be sold in the next 5 years and only about 1
million workstations - why should IBM bother with 1% of the market
unless it buys them something?)

>I guess the days of programming for the least common denominator are
>gone.  

Absolutely - I won't miss e/vi/edlin one bit!

>      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

Work smarter, not harder.  You're never going to be able to compete
with companies who don't slog the same footpath as you.  If you
reinvent the wheel for each app, you're leaving out that extra feature
that might get you another N buyers.

Users are getting more sophisticated in their desires for interfaces -
buy tools that support this and let you work on the good stuff - the
reason people buy your work.

>resources to support a major conversion with every hardware platform
>change.  And can you imagine the maintenance problems!?!?

So buy a OS-platform independent interface and write your code to that.
Or go client-server (check out Notes).

Get away from the gate-level programming - work at a higher level and
optimize that which needs it.  

BTW, this isn't meant to be a flame - please take it as constructive
criticism.  Backwards compatibility is good, but we have a *really*
long way to go before computers are really usable.

Pete

Not an official statement from Honeywell - this is my opinion only.
Newsgroups: comp.os.os2.programmer
From: hilmera@ucs.orst.edu (Andrew Hilmer)
Subject: Question and problem with GCC/2
Organization: University Computing Services - OSU
Date: Wed, 19 Aug 1992 21:23:28 GMT

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

First the question. I have no trouble compiling and linking the
sample1.c "hello world" program, but I am curious about the multiple
prompts that link386 gave me. I just hit <enter> and the defaults
seemed to work ok. I could find no on-line documentation of link386,
of course. Is there some documentation of link386 available on the
net? I am FLAT broke, so getting a shelf-full of IBM docs is not an
option.

Now the problem. While the sample1.c file worked fine, a simple
programming assignment performed bizarrely after compiled and linked.

88888888888888888888888888888888888888888888888888888888

/*
  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);
}

88888888888888888888888888888888888888888888888888888888

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.

It printed:

This is my first C program.
Enter an integer: Enter a floating point number: The value stored in x is 3
The value stored in y is 93.900002

WHY the F**K does it do what is supposed to be executed FIRST, LAST????.
It worked fine with EMX/GCC, GCC for Unix, and I didn't have to do
anything fundamental to get it work with Think C on the mac. Hell, I
basically just typed in what the teacher said to type in.

Don't worry, I used EMX for the class. But now that I have a lot of
time on my hands, I want to track this strangeness down.

Thanks

andy
-- 
hilmera@ucs.orst.edu  Why settle for the *lesser* of evils? Cthulu 92!

Newsgroups: comp.os.os2.programmer
From: hartzman@kilroy.Jpl.Nasa.Gov (Les Hartzman)
Subject: I/O Redirection
Followup-To: hartzman@kilroy.jpl.nasa.gov
Keywords: I/O Redirection, stdout, session
Organization: Jet Propulsion Laboratory, Pasadena, CA
Distribution: na
Date: Mon, 17 Aug 1992 22:05:41 GMT

Can a session redirect all output to stdout to another process?  In other
words, if a program writes to stdout, can the output be intercepted for
placement in a particular window on the screen?

Email or post responses.  Thanks.

Les.


-- 
Les Hartzman                hartzman@kilroy.jpl.nasa.gov
Jet Propulsion Laboratory   M/S 238-528    (818) 354-5964
4800 Oak Grove Dr., Pasadena,  CA.  91109
Newsgroups: comp.os.os2.programmer
From: Ralf.Wirth@arbi.informatik.uni-oldenburg.de (Ralf Wirth)
Subject: Re: Bug in GCC / OS 2 ??
Organization: University of Oldenburg, Germany
Date: Thu, 13 Aug 1992 11:21:58 GMT
Keywords: GCC

rb532@rbhp17.rbg.informatik.th-darmstadt.de () writes:

>Hi.

Hi!

 ...
 
>(perhaps ther are some syntax Errors now, but this doesn't matter)
>I compile this program with GCC 2.1.
>The result is an executable file.
>I run it, and it asks for input, until I press X, and then prints 
>"begin of program", then prints the digits, and then prints the "end"
>why is this disorder ?


You just have to set the input buffer to 0 bytes. the function is somewhere
in stdio.

-- 
*****************************************************************************
*                                                                           *
* Name: Ralf Wirth                                                          *
* Job : Student of computer science/Wizard of Nightfall (Veltins).          *
* Login : Henry@Aragorn, Henry@Schrottpollo                                 *
* E-Mail Address: Ralf.Wirth@arbi.informatik.uni-oldenburg.de               *
* ------------------------------------------------------------------------- *
* No, I'm not related to him.                                               *
*****************************************************************************
From: francis@vnet.ibm.com (Tim Francis)
Date: Thu, 13 Aug 92 11:30:38 EDT
Subject: The workframe is out to get me.
Newsgroups: comp.os.os2.programmer
Reply-To: francis@vnet.ibm.com
Organization: IBM Canada Lab, WorkFrame/2 development
Disclaimer: This posting represents the poster's views, not those of IBM

In article <92225.104721DK6TOPER@MIAMIU.BITNET>,
Dan Karipides <DK6TOPER@MIAMIU.BITNET> writes:
>
>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?

Go to the Configure->preferences menu, and select "capture tools".  This
will make the editor a child of the WorkFrame, and thus allow it to float
above the WorkFrame client area.  You can also use the switch list, which
is a customizable version of the WPS task list.  Select Configure->
Switch list to select which OS/2 sessions appear on this pulldown.  If
you've selected capture tools, they will appear in the Windows->Sessions
pulldown instead.

Alternatively, simply resize the WorkFrame client area (the main window,
with the action bar) down to only the action bar.  The other dialogs
(the project windows, etc) will still display just fine, and you'll be
able to see other windows much easier.

>(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?

Most of the above suggestions apply here as well.  What I do is:
 - resize the client down to only the action bar
 - start all/most of the help & references that I'll want, and then
   use Configure->Switch list to make those the only items that show
   up in the switch list.
I can now see most of the windows that I want, and even if I can't,
they are quick and easy to find on either the Switch list or the Windows
pulldown.

Hope that helps.   -tim
Xref: sparky comp.os.os2.programmer:4296 comp.os.os2.apps:5371 comp.os.os2.misc:27597
From: gruen@ipc1.rrzn.uni-hannover.de (Lutz Grueneberg)
Newsgroups: comp.os.os2.programmer,comp.os.os2.apps,comp.os.os2.misc
Subject: Re: GCC/2 2.2.2 now available
Keywords: LIB
Date: 18 Aug 92 08:38:27 GMT
Organization: University of Hannover, Germany

In article <1992Aug17.015307.55819@frodo.cc.flinders.edu.au>, mmtl@cc.flinders.edu.au (T.Lampre) writes:
|> Other things that need doing (ordered according to my priorities) :
|> 
|> 	1. Create a PD librarian. It would seem the Toolkit doesn't
|> 	   have LIB.EXE. This is strange as my beta toolkit did. My
|> 	   production toolkit is still on order.
I've got the production toolkit from IBM and it contains a LIB.EXE :).
-- 
// Lutz Gr"uneberg
// Lehrgebiet Rechnernetze und Verteilte Systeme
// Universit"at Hannover
// Schlosswender Str. 5
// D-3000 Hannover 1, Germany
//
// Email: Grueneberg@rrzn.uni-hannover.dbp.de
//
//				... have a  n.i.c.e. day
Organization: Johannes Kepler University Linz - Computing Center
Date: Friday, 14 Aug 1992 18:26:31 CDT
From: <K390670@ALIJKU11.BITNET>
Newsgroups: comp.os.os2.programmer
Subject: Need kernel data structures

I am porting an ABIOS extension from OS/2 1.3 (where it works fine) to OS/2
2.0. The extension basically hooks into the disk ABIOS, learns the *PHYSICAL*
address of data being read/written from the ABIOS request block, does some-
thing with the data, then passes the data on. Fine under 1.3, but under 2.0
PAGING gets in my way. As I'm running at ring 0, I can do everything I want
if I know *where* to do it. Enter my problem: I have to get a virtual
address for the physical address, which means I'd like to look it
up in some internal data structure. (You would not want to scan all page
tables sequentially...)

In the kernel debugger, it just takes 4 commands to do that.

Question: How to do it while executing in ring 0 ? (Kernel data structures)
Question 2: Is there any docu about field acronyms which the kernel debugger
            prints quite generously ?
Question 3: As the page directory is at different physical and virtual
            addresses on different machines, is there something like a
            master master pointer, that is the key to all kernel data
            structures ?
            Funnily enough, the page directory itself is *not* referred
            to by a page table entry (as it is suggested in Intel's
            operating system writer's guide) ...

I'd appreciate help from any OS/2 2.0 gurus, especially from some IBM
guys.


o_O   Gregor 'Greg' Glawitsch
 J    Research Institute for Microprocessor Applications
 o    Johannes Kepler University Linz/AUSTRIA
      K390670@ALIJKU11.EDVZ.UNI-LINZ.AC.AT

"Everybody should believe in something, I believe I should have another beer!"
Newsgroups: comp.os.os2.programmer
From: feustel@netcom.com (David Feustel)
Subject: How to stop keyboard echo in C Set/2?
Date: Fri, 21 Aug 92 00:24:41 GMT
Organization: DAFCO: OS/2 Software Support & Consulting

I'm writing a terminal emulator program in 32-bit code using C Set2.
I need to be able to read the keyboard without echoing the input. Does
anyone know how to do this in 32-bit mode? 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.

The Drug War is a government-sponsored, taxpayer-financed,
full-employment program for psycho/socio-paths, wannabees and
gonnabees.
From: eldenbrg@stortek.com (Dave Eldenburg)
Newsgroups: comp.os.os2.programmer
Subject: Where am I going wrong????
Date: 14 Aug 92 15:32:24 GMT
Distribution: na
Organization: Storage Technology Corp.

Hi all,

Being an owner of the IBM technical doc I feel a little strange asking
this question.  You can respond with RTFM but at least give me a manual
name and a page number.

I have been through the manuals and I cannot figure out how to get
the number of lines and the number of columns defined for the screen
in a non-pm program.

Thanks in advance.

Dave
Newsgroups: comp.os.os2.programmer,comp.lang.c
From: davisonj@bnr.ca (John Davison)
Subject: Re: malloc causes a segmentation violation!?
Summary: just another plug for user-defined heap management
Organization: Bell-Northern Research, Richardson, Tx.
Date: Wed, 19 Aug 1992 17:13:17 GMT

In article <1992Aug19.155648.6210@funet.fi> mn87504@cs.tut.fi (Naatula Mika) writes:
>I made my own Smalloc and and Sfree functions which call the standard
>malloc and free. I save in a table the allocated pointers and compare them
>before free is called. This is an easy way to catch many possible errors.

        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. 
Newsgroups: comp.os.os2.programmer
From: phbeh%Solomon.Technet.sg (Beh Pang Han)
Subject: Request info for CD-ROM driver interface
Organization: National University of Singapore
X-Newsreader: Tin 1.1 PL5
Date: Wed, 19 Aug 1992 03:46:35 GMT


I'm writing a CD-ROM OS/2 device driver, and I'm stuck! The current driver is
able to accept call from DosOpen, DosClose and DosDevIOCtl commands, but is
not working in Dos box which uses VCDROM.SYS and CDFS.FS to emulate MSCDEX
API. I've found that during the startup of Dos box session, the following
calls are called (in the order of listing).

   device open	  function 0x0d
   Generic IOCtl  Category 0x05  function 0x48 - Set active font
   Generic IOCtl  Category 0x05  function 0x48 - Set active font
   Generic IOCtl  Category 0x82  function 0x60 - Return drive letter info

When the above are done, any call to MSCDEX will not activate the driver,
instead it will return error 'Drive not ready'.

It is not documented how the VCDROM.SYS establish the connection to the
physical device driver (PDD). Could it be using the device name specified
in the driver header? In this case, I'm using name 'CD-ROM2$' that I've found
in the CDROM.SYS of OS/2 which is also not documented in the OS/2 technical
library.

If you have any comment regarding the above, please response.
From: x91clifton1@gw.wmich.edu
Newsgroups: comp.os.os2.programmer
Subject: Re: Where am I going wrong????
Date: 16 Aug 92 20:12:02 EST
Organization: Western Michigan University

In article <1992Aug15.230628.2317@stortek.com>, eldenbrg@stortek.com (Dave Eldenburg) writes:
> In article <713823955snx@sugs.tware.com> landis@sugs.tware.com (Hale Landis) writes:
>>In article <1992Aug14.153224.26174@stortek.com> eldenbrg@stortek.com writes:
>>  >
>>  > I have been through the manuals and I cannot figure out how to get
>>  > the number of lines and the number of columns defined for the screen
>>  > in a non-pm program.
>>  >
>>Use the VioGetMode() call.
> 
> I beleive this is an OS/2 1.x call and is only supported for migration.
> There is no referance to this or any other Vio call in the IBM Technical
> Doc.
> 
> Thanks anyway Hale, see you in a couple weeks...
> 
> Still seeking info.
>  
> Dave

All the {Vio,Kbd,Mou} calls are indeed 16-bit calls left over from OS/2 1.x.
Try getting a copy of `Advanced OS/2 Programming' by Ray Duncan for a
discussion of Vio calls.

Hope this helps,

/Doug
--
Douglas Clifton [99clifto@lab.cc.wmich.edu]
From: jeff@claw.clearpoint.com (Jeffrey J. Griglack)
Newsgroups: comp.os.os2.programmer
Subject: Using system() command in GCC/OS2
Date: 17 Aug 92 22:02:34 GMT
Reply-To: jeff@claw.clearpoint.com
Distribution: usa
Organization: /home/jeff/.organization


I am using the native version of GCC (I forget what he said he wanted
to call it) and I am trying to use the system() standard library call.
I cannot get it to link.  Link386 tells me that _system does not
exist.  What am I doing wrong?  Was this not implemented in this
release of GCC?

Thanks in advance,
--

-------------------------------------------------------------------------------
|Jeff Griglack             |"Hey, you talking to me or are you just practicing|
|jeff@claw.clearpoint.com  | for one of those performances you do?"           |
|jeff@fang.clearpoint.com  |                          -- Lori Anderson        |
-------------------------------------------------------------------------------
Newsgroups: comp.os.os2.programmer,comp.lang.c