f



"Process terminated by SIGINT"?

What would cause the message in the subject to appear whenever I terminate
a program (e.g. with Ctrl-C)?  How do I stop it without modifying the
source code?  Is there a GCC compiler option that's likely to affect this?


EXPLANATION:

I'm compiling CAWF for OS/2.  With the distributed binaries, when the 
program terminates it simply exits silently.  e.g. using it interactively:

    [C:\]cawf
    ^C
    [C:\]

Or when piping output through a pater:

    [C:\]cawf test.fil |less
    ...<formatted output>...
    [user presses 'q']
    [C:\]

However, when I recompile the program, it always spits up the message 
"Process terminated by SIGINT" on termination.  Why?  I'm using the
exact same source code, and the distributed Makefile.os2, which should be
what the original maintainer used.

    [C:\]cawf
    ^C
    Process terminated by SIGINT

    [C:\]

I've tried compiling with both EMX-GCC and GCC 3.2.2, using both normal
and "-Zomf -Zmts" make targets.

(The program works fine apart from this annoying message.)

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
2/24/2006 7:08:02 PM
comp.os.os2.programmer.misc 1326 articles. 0 followers. Post Follow

71 Replies
544 Views

Similar Articles

[PageSpeed] 21

In <43ff5941$0$4828$bb4e3ad8@newscene.com>, on 02/24/2006
   at 01:08 PM, Alex Taylor <mail.me@reply.to.address> said:

>What would cause the message in the subject to appear whenever I
>terminate a program (e.g. with Ctrl-C)?  How do I stop it without
>modifying the source code?  Is there a GCC compiler option that's likely
>to affect this?

Unlikely.  Ctrl-C generates a SIGINT in the unix world.  The default
action of the runtime is to terminate the app, unless the app has arranged
to catch the signal.

>I'm compiling CAWF for OS/2.

Using the emx target?  If so, the message is normal behavior.

>However, when I recompile the program, it always spits up the message 
>"Process terminated by SIGINT" on termination.  Why?

You do realize that the distributed was built with Borland, don't you? 
That would be my first guess.

FWIW, the fact

>I'm using the exact
>same source code, and the distributed Makefile.os2, which should be what
>the original maintainer used.

I suspect the emx build always worked this way.  I assume I found the same
cawf.zip you started with.

Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
2/24/2006 7:46:31 PM
On Fri, 24 Feb 2006 19:08:02 UTC, Alex Taylor <mail.me@reply.to.address>
wrote:

> What would cause the message in the subject to appear whenever I terminate
> a program (e.g. with Ctrl-C)?  How do I stop it without modifying the
> source code?  Is there a GCC compiler option that's likely to affect this?

Default action for the INT signal, with whatever runtime library it's 
using.

The usual way to stop it is to put in a call (yes, I know you didn't 
want to modify the source code, but it's minor) to signal(), to tell it 
to catch SIGINT, and call a function that just calls exit().

0
Bob
2/24/2006 9:06:09 PM
Bob Eager wrote:
> On Fri, 24 Feb 2006 19:08:02 UTC, Alex Taylor <mail.me@reply.to.address>
> wrote:
> 
>> What would cause the message in the subject to appear whenever I terminate
>> a program (e.g. with Ctrl-C)?  How do I stop it without modifying the
>> source code?  Is there a GCC compiler option that's likely to affect this?
> 
> Default action for the INT signal, with whatever runtime library it's 
> using.
> 
> The usual way to stop it is to put in a call (yes, I know you didn't 
> want to modify the source code, but it's minor) to signal(), to tell it 
> to catch SIGINT, and call a function that just calls exit().
> 

Like:

....
signal( SIGINT, MyIntHandler );
....


void MyIntHandler( int signo )
{
     exit(signo);
}


-- 
M Greene  IRC (MikeG)

<Finally getting updated>
OS/2 Stuff    : http://www.mgreene.org/os2
My OpenWatcom : http://www.mgreene.org/watcom
0
Michael
2/25/2006 2:56:05 AM
On Sat, 25 Feb 2006 02:56:05 UTC, Michael Greene <listsnews@cox.net> 
wrote:

> Bob Eager wrote:
> > On Fri, 24 Feb 2006 19:08:02 UTC, Alex Taylor <mail.me@reply.to.address>
> > wrote:
> > 
> >> What would cause the message in the subject to appear whenever I terminate
> >> a program (e.g. with Ctrl-C)?  How do I stop it without modifying the
> >> source code?  Is there a GCC compiler option that's likely to affect this?
> > 
> > Default action for the INT signal, with whatever runtime library it's 
> > using.
> > 
> > The usual way to stop it is to put in a call (yes, I know you didn't 
> > want to modify the source code, but it's minor) to signal(), to tell it 
> > to catch SIGINT, and call a function that just calls exit().
> > 
> 
> Like:
> 
> ...
> signal( SIGINT, MyIntHandler );
> ...
> 
> 
> void MyIntHandler( int signo )
> {
>      exit(signo);
> }

Exactly. But I thought Alex would be able to work it out!

0
Bob
2/25/2006 10:40:06 AM
On 24 Feb 2006 21:06:09 GMT, Bob Eager <rde42@spamcop.net> wrote:
>> What would cause the message in the subject to appear whenever I terminate
>> a program (e.g. with Ctrl-C)?  How do I stop it without modifying the
>> source code?  Is there a GCC compiler option that's likely to affect this?
>
> Default action for the INT signal, with whatever runtime library it's 
> using.
>
> The usual way to stop it is to put in a call (yes, I know you didn't 
> want to modify the source code, but it's minor) to signal(), to tell it 
> to catch SIGINT, and call a function that just calls exit().

Yeah, but then I'd have to figure out where it goes in the code, and I
suck at reading other peoples' code.

It also opens up possible copyright headaches, like possibly updating the
credits, trying to notify the author, etc.  I'd really rather avoid it.


-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
2/27/2006 4:43:09 PM
On Fri, 24 Feb 2006 19:46:31 GMT, Steven Levine <steve53@earthlink.bogus.net> wrote:
>>What would cause the message in the subject to appear whenever I
>>terminate a program (e.g. with Ctrl-C)?  How do I stop it without
>>modifying the source code?  Is there a GCC compiler option that's likely
>>to affect this?
>
> Unlikely.  Ctrl-C generates a SIGINT in the unix world.  The default
> action of the runtime is to terminate the app, unless the app has arranged
> to catch the signal.

Yeah, but why does the runtime have to spit out that message (with no
apparent way to turn it off)?

OK, ok, I understand why it makes a certain amount of sense, but in this
case it's damn annoying.  


> You do realize that the distributed was built with Borland, don't you? 
> That would be my first guess.

Doh!  I didn't realize that... it might explain it.

Hmmm... if it can be compiled by a non-*nix compiler like Borland, I
wonder if it can be compiled (as-is) with Watcom?

I already know ICC doesn't like it (presumably due to Unix-isms in the
code, which I am loathe to modify).


If you're wondering what my purpose is, I've written a simplified 'man'
command that uses CAWF instead of GROFF.  I don't want that silly 'Process
terminated...' message appearing every time the user hits 'q'.

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
2/27/2006 4:49:06 PM
 > I don't want that silly 'Process terminated...' message
 > appearing every time the user hits 'q'.

Not having an idea what I'm talking about: save the screen contents
(Vio*), run the app which displays the message, restore the screen? 



---
0
ML
2/27/2006 5:20:13 PM
ML wrote:
>  > I don't want that silly 'Process terminated...' message
>  > appearing every time the user hits 'q'.
> 
> Not having an idea what I'm talking about: save the screen contents
> (Vio*), run the app which displays the message, restore the screen? 

Were you a Windows developer in a former lifetime?  That suggestion 
deserves 30 lashes followed by a dip in a pool of lemonade.

-- 
[Reverse the parts of the e-mail address to reply.]
0
Marty
2/27/2006 5:37:06 PM
 >> Not having an idea what I'm talking about

 > Were you a Windows developer in a former lifetime?

False, but that's a rather obvious guess... :-)

 > That suggestion deserves 30 lashes followed by a dip in a
 > pool of lemonade.

Well, I don't know what essential output the app has, but if
a beauty contest contribution like just deleting the line is
worth 31 lashes, I'll settle for that. I.e. using the same
(possibly bad) idea. Anyway, I just HTH.



---
0
ML
2/27/2006 5:49:36 PM
On Mon, 27 Feb 2006 16:43:09 UTC, Alex Taylor <mail.me@reply.to.address>
wrote:

> On 24 Feb 2006 21:06:09 GMT, Bob Eager <rde42@spamcop.net> wrote:
> >> What would cause the message in the subject to appear whenever I terminate
> >> a program (e.g. with Ctrl-C)?  How do I stop it without modifying the
> >> source code?  Is there a GCC compiler option that's likely to affect this?
> >
> > Default action for the INT signal, with whatever runtime library it's 
> > using.
> >
> > The usual way to stop it is to put in a call (yes, I know you didn't 
> > want to modify the source code, but it's minor) to signal(), to tell it 
> > to catch SIGINT, and call a function that just calls exit().
> 
> Yeah, but then I'd have to figure out where it goes in the code, and I
> suck at reading other peoples' code.

At the start of main()....!


0
Bob
2/27/2006 6:19:34 PM
In <44032cf7$0$26133$bb4e3ad8@newscene.com>, on 02/27/2006
   at 10:49 AM, Alex Taylor <mail.me@reply.to.address> said:

>Yeah, but why does the runtime have to spit out that message (with no
>apparent way to turn it off)?

I consider this the wrong question.  There is a way to turn it off.  Why
didn't the application developer make use of the feature?

>OK, ok, I understand why it makes a certain amount of sense, but in this
>case it's damn annoying.  

We are all rather picky.   guess it comes with the territory. :-)

>Hmmm... if it can be compiled by a non-*nix compiler like Borland, I
>wonder if it can be compiled (as-is) with Watcom?

Take a look at the supplied makefiles.  I would check for you, but it
appears I had a case of the mad-cleanies and the zip file is already gone.

One thing I can assure you about is that in general wmake will not
understand non-wmake specific makefiles. :-(

Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
2/27/2006 7:27:18 PM
Steven Levine wrote:

> One thing I can assure you about is that in general wmake will not
> understand non-wmake specific makefiles. :-(
> 
  Except for NMAKE specific makefiles, for which there is a -ms switch.


         Michal
0
Michal
2/27/2006 7:31:06 PM
On Mon, 27 Feb 2006 19:27:18 GMT, Steven Levine <steve53@earthlink.bogus.net> wrote:
>>Hmmm... if it can be compiled by a non-*nix compiler like Borland, I
>>wonder if it can be compiled (as-is) with Watcom?
>
> Take a look at the supplied makefiles.  I would check for you, but it
> appears I had a case of the mad-cleanies and the zip file is already gone.

Apparently, the answer is "yes".  I compiled it with OW 1.4 and the SIGINT
message is gone.  :)


> One thing I can assure you about is that in general wmake will not
> understand non-wmake specific makefiles. :-(

Well, OK, insert "After some makefile fiddling..." before the second
sentence of the paragraph above... :)


-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
2/27/2006 9:42:04 PM
On Mon, 27 Feb 2006 18:19:34 UTC, "Bob Eager" <rde42@spamcop.net> wrote:

> > >> What would cause the message in the subject to appear whenever I terminate
> > >> a program (e.g. with Ctrl-C)?  How do I stop it without modifying the
> > >> source code?  Is there a GCC compiler option that's likely to affect this?
> > >
> > > Default action for the INT signal, with whatever runtime library it's 
> > > using.
> > >
> > > The usual way to stop it is to put in a call (yes, I know you didn't 
> > > want to modify the source code, but it's minor) to signal(), to tell it 
> > > to catch SIGINT, and call a function that just calls exit().
> > 
> > Yeah, but then I'd have to figure out where it goes in the code, and I
> > suck at reading other peoples' code.
> 
> At the start of main()....!

Ah.  Well, shows you how good I am at this stuff...

Anyway, compiling with OpenWatcom seems to work as a solution, so I'll
probably stick with that (unless I find bugs).

Thanks...
-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
2/28/2006 4:16:02 AM
On Mon, 27 Feb 2006 19:31:06 UTC, Michal Necasek <michaln@scitechsoft.com> wrote:

> > One thing I can assure you about is that in general wmake will not
> > understand non-wmake specific makefiles. :-(
> > 
>   Except for NMAKE specific makefiles, for which there is a -ms switch.

I think I managed to write a WMAKE-specific one.  It basically means 
changing all the line-continuation characters from '\' to '&'.

For some reason, the final target 'clean:' spits out the complaint
'(clean) does not exist and cannot be made from existing files', and yet
it executes it correctly.

Other than that, everything seems to work.


FWIW, I'm a total newbie with OW; in fact, I've never managed to get it to
build anything before... mainly because I cannot figure out how to tell
wlink to do what I want (and the documentation is absolutely no help).  
In this case, I avoided the problem by simply using wcl386.


-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
2/28/2006 4:23:01 AM
Alex Taylor wrote:

> For some reason, the final target 'clean:' spits out the complaint
> '(clean) does not exist and cannot be made from existing files', and yet
> it executes it correctly.
> 
  That is normal. If a target isn't a file, you need to say it's 
..symbolic because wmake is stricter than other make tools and performs 
extra checks on the targets.

> FWIW, I'm a total newbie with OW; in fact, I've never managed to get it to
> build anything before... mainly because I cannot figure out how to tell
> wlink to do what I want (and the documentation is absolutely no help).  
> In this case, I avoided the problem by simply using wcl386.
> 
  The wlink syntax is "different" and takes some getting used to, but I 
don't think the documentation in the Linker Guide is inadequate. Because 
wlink is a Swiss Army knife compared to other linkers, it is by 
necessity more complex and has a steeper learning curve. Using wcl(386) 
is certainly a viable alternative for many (most?) tasks.


         Michal
0
Michal
2/28/2006 4:33:37 AM
On a pleasant day while strolling in comp.os.os2.programmer.misc, a 
person by the name of ML exclaimed:
> 
>  > I don't want that silly 'Process terminated...' message
>  > appearing every time the user hits 'q'.
> 
> Not having an idea what I'm talking about: save the screen contents
> (Vio*), run the app which displays the message, restore the screen? 

Of course, don't forget to save the whole buffer, regardless of how high 
it is (200 lines? more?). And don't forget colors. And it could be in 
some unexpected width, too. and... and ...


-- 
aaronl at consultant dot com 
For every expert, there is an equal and 
opposite expert. - Arthur C. Clarke
0
Aaron
2/28/2006 9:01:30 AM
On Tue, 28 Feb 2006 04:33:37 GMT, Michal Necasek <michaln@prodigy.net> wrote:
>> For some reason, the final target 'clean:' spits out the complaint
>> '(clean) does not exist and cannot be made from existing files', and yet
>> it executes it correctly.
> 
>   That is normal. If a target isn't a file, you need to say it's 
> .symbolic because wmake is stricter than other make tools and performs 
> extra checks on the targets.

Ah, OK.  Thanks.


>> FWIW, I'm a total newbie with OW; in fact, I've never managed to get it to
>> build anything before... mainly because I cannot figure out how to tell
>> wlink to do what I want (and the documentation is absolutely no help).  
>> In this case, I avoided the problem by simply using wcl386.
>> 
>   The wlink syntax is "different" and takes some getting used to, but I 
> don't think the documentation in the Linker Guide is inadequate. Because 
> wlink is a Swiss Army knife compared to other linkers, it is by 
> necessity more complex and has a steeper learning curve. Using wcl(386) 
> is certainly a viable alternative for many (most?) tasks.

Not to disparage the undeniably good work, but IMHO there are two main
problems with the OW documentation.  First, it seems to be laid out on the
assumption that the user will sit down and read everything from start to
finish before compiling anything.  Of course, that impression may be due
to my unfamiliarity with all the terms it uses.  Which leads in to the
second problem: it seems to be written at a technical level about five
years' worth of education beyond my capacity.  

Honestly, at least half the time I have no idea what it's talking about.
And I have a BA in Computer Science...

I grant you, it's nowhere near as bad as the EMX-GCC documentation, which
is a classic exercise in pure unmitigated gobblegook.

And I appreciate the fact that it's clearly complete, comprehensive, and
undoubtedly informative if I ever learn what it all means...   :)


-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
2/28/2006 4:01:14 PM
 >>> I don't want that silly 'Process terminated...' message
 >>> appearing every time the user hits 'q'.
 
 >> Not having an idea what I'm talking about: save the screen contents
 >> (Vio*), run the app which displays the message, restore the screen? 

 > Of course, don't forget to save the whole buffer, regardless
 > of how high it is (200 lines? more?). And don't forget colors.
 > And it could be in some unexpected width, too. and... and ...

I understood you already found a better solution, but FWIW the
buffer's size (just under 8 Kb) and other possible sizes (from
1 to just onder 8 Kc) are limited. Assuming the output isn't
being showed in a PM window, and ...



---
0
ML
2/28/2006 5:13:46 PM
Alex Taylor wrote:

> Not to disparage the undeniably good work, but IMHO there are two main
> problems with the OW documentation.  First, it seems to be laid out on the
> assumption that the user will sit down and read everything from start to
> finish before compiling anything.  Of course, that impression may be due
> to my unfamiliarity with all the terms it uses.  Which leads in to the
> second problem: it seems to be written at a technical level about five
> years' worth of education beyond my capacity.  
> 
  I can see that it is a problem. I have no idea how to solve it.

  The problem is that people who have no clue about the product are 
clearly in no position to write its documentation. However, people who 
are in a position to write documentation will write something along the 
lines of what you see, because they are very familiar with and 
knowledgeable of the product.

  I (for instance) am not in a position to write tutorial-style 
documentation because I can't simply forget all I know, and can't 
accurately judge what's obvious and what's tricky for people who've 
never seen Open Watcom before.

  If you know how to solve this dilemma, let me know.

> Honestly, at least half the time I have no idea what it's talking about.
> And I have a BA in Computer Science...
>
  You should demand your money back, if you paid for your education ;)

> I grant you, it's nowhere near as bad as the EMX-GCC documentation, which
> is a classic exercise in pure unmitigated gobblegook.
> 
  I thought the worst problem with that documentation was that it 
largely didn't exist :P


         Michal
0
Michal
2/28/2006 6:43:47 PM
On Tue, 28 Feb 2006 18:43:47 UTC, Michal Necasek 
<michaln@scitechsoft.com> wrote:

> > Honestly, at least half the time I have no idea what it's talking about.
> > And I have a BA in Computer Science...
> >
>   You should demand your money back, if you paid for your education ;)

Well, it *was* a U.S. degree, not a British one :-)

(ducks and runs)


0
Bob
2/28/2006 7:49:44 PM
 > I (for instance) am not in a position to write tutorial-style 
 > documentation because I can't simply forget all I know

You don't have to forget all you know. All you know actually
can be used to explain about everything. See this thread. If
you know all: use a signal handler to take care of SIGINT. If
you assume (basic level of knowledge required) everybody knows
what a signal handler is, what it looks like, and so on, you're
done! However, your target audiance may not know that. But then
you know what it should look like, and can post an example. That
may be enough. Nevertheless, it was still required to mention to
add the code in the main()-area, assuming people have heard of
this main() suddenly mentioned. I think you're perfectly capable
of adding all you know, and in an ideal world that should match
the requirements and assumed level of knowledge of your audiance.

BTW please note that "use a signal handler to take care of
SIGINT" already contains another problem. If the reader already
knows enough about signal handlers, the original question may
not have existed in the first place. Anyway, completing the
*.DOC's for a complicate product never is easy.

 > and can't accurately judge what's obvious and what's tricky
 > for people who've never seen Open Watcom before.

True. What about working together with the target audiance, e.g.
first-time users of Open Watcom? For one to select levels of
assumed basic knowledge. The expert can mention "use a signal
handler", the novice user can ask for adding an example and
the mentioning of main(). Goal: demand matches the supply of 
documentation, which may require to add all you know.



---
0
ML
2/28/2006 7:59:22 PM
ML wrote:

> You don't have to forget all you know. All you know actually
> can be used to explain about everything. 
 >
  That's what the library documentation does.

> I think you're perfectly capable
> of adding all you know, and in an ideal world that should match
> the requirements and assumed level of knowledge of your audiance.
> 
  And what *is* the assumed level of knowledge of the audience?

> True. What about working together with the target audiance, e.g.
> first-time users of Open Watcom? 
 >
  Am I supposed to hunt them down? I don't know who they are, and I 
definitely don't know what sort of documentation *they* would find 
helpful. They need to come forward.

  Your target audience right there ("first-time users of Open Watcom") 
is already so heterogenous as to make any talk of target audience 
meaningless. It applies to people who never saw a compiler in their life 
as well as expert programmers who used several different compilers.


         Michal
0
Michal
2/28/2006 8:15:27 PM
In <440371c8$0$463$bb4e3ad8@newscene.com>, on 02/27/2006
   at 03:42 PM, Alex Taylor <mail.me@reply.to.address> said:

>Apparently, the answer is "yes".  I compiled it with OW 1.4 and the
>SIGINT message is gone.  :)

:-)

>Well, OK, insert "After some makefile fiddling..." before the second
>sentence of the paragraph above... :)

I suspect you mean, "until some makefile twiddling is applied,"  but I
know this well.  As Michal mentioned, there's the -ms switch.  It's handy
when it works.

The Watcom command line options are different and there are a lot of them.

I don't find the documentation all that difficult to handle beyond that
fact that there's a lot of it.  It's not difficult to search if you use
view.exe.  Newview is much prettier, but just does not do searches the way
I do.

When searching from the command line, I handle the documentation volume
with the appended 4os2 script.  It lets me view as much or as little of
the documentation as I need with a minimum of keystrokes.


Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------
@echo off
:: WatInf - View Watcom INFs
:: 09 May 05 SHL Baseline
:: 11 Aug 05 SHL Add smart selection

on errormsg pause
setlocal

if "%WATCOM" == "" call Watcom
cdd %WATCOM\binp\help

set W=
set T=
iff "%@substr[%1,0,1]" == "-" then
  echo Usage watinf [-h] [?] [infs...] [topic]
  quit
elseiff "%1" == "" then
  set W=WATINF
elseiff "%1" == "?" then
  set NF=%@unique[%TMP]
  select echo ( *.inf ) >>%NF
  for %X in ( @%NF ) set W=%W %@name[%X]
  del /q %NF
else
  for %X in ( %$ ) do (
    iff exist %X then
      set W=%W %X
    elseiff exist %X.inf then
      set W=%W %X
    elseiff exist %X*.inf then
      set W=%W %@name[%@expand[%X*.inf]]
    elseiff exist *%X*.inf then
      set W=%W %@name[%@expand[*%X*.inf]]
    elseiff "%X" == "WATINF" then
      set W=%W %X
    else
      set T=%T %X	%+ rem Assume topic
    endiff
  )
endiff

set W=%@trim[%W]
set T=%@trim[%T]
iff "%W" == "" then
  echo Nothing selected for %$
else
  set W=%@replace[ ,+,%W]
  echo on
  view %W %T
endiff

0
Steven
2/28/2006 9:38:39 PM
[A complimentary Cc of this posting was sent to
Aaron Lawrence 
<aaronlNOT@HEREconsultant.com>], who wrote in article <MPG.1e6eca869847e3b0989ec6@news.xtra.co.nz>:
> >  > I don't want that silly 'Process terminated...' message
> >  > appearing every time the user hits 'q'.
> > 
> > Not having an idea what I'm talking about: save the screen contents
> > (Vio*), run the app which displays the message, restore the screen? 
> 
> Of course, don't forget to save the whole buffer, regardless of how high 
> it is (200 lines? more?). And don't forget colors. And it could be in 
> some unexpected width, too. and... and ...

What are you trying to allude to?  That this is something difficult?

Eg. with perl you do it like

 perl -MOS2::Process -wle "$s = screen; print 'Unneeded output'; screen_set $s"

The only real problem is that the screen size could have been changed
in between; so it is better to store/restore the size too (and this is
as "complicated" as above...).

Hope this helps,
Ilya
0
Ilya
2/28/2006 10:53:53 PM
Alex Taylor wrote:
> On Mon, 27 Feb 2006 18:19:34 UTC, "Bob Eager" <rde42@spamcop.net> wrote:
> 
>>>>> What would cause the message in the subject to appear whenever I terminate
>>>>> a program (e.g. with Ctrl-C)?  How do I stop it without modifying the
>>>>> source code?  Is there a GCC compiler option that's likely to affect this?
>>>> Default action for the INT signal, with whatever runtime library it's 
>>>> using.
>>>>
>>>> The usual way to stop it is to put in a call (yes, I know you didn't 
>>>> want to modify the source code, but it's minor) to signal(), to tell it 
>>>> to catch SIGINT, and call a function that just calls exit().
>>> Yeah, but then I'd have to figure out where it goes in the code, and I
>>> suck at reading other peoples' code.
>> At the start of main()....!
> 
> Ah.  Well, shows you how good I am at this stuff...
> 
> Anyway, compiling with OpenWatcom seems to work as a solution, so I'll
> probably stick with that (unless I find bugs).
> 
> Thanks...

Alex,

I just looked at the source. Where is this "simplified 'man' command" 
you have?

I noticed in the headers that Henry Spencer wrote it. I guess this is 
the same Henry Spencer of regex fame.

-- 
M Greene  IRC (MikeG)

<Finally getting updated>
OS/2 Stuff    : http://www.mgreene.org/os2
My OpenWatcom : http://www.mgreene.org/watcom
0
Michael
3/1/2006 4:23:15 AM
Bob Eager wrote:
> On Tue, 28 Feb 2006 18:43:47 UTC, Michal Necasek 
> <michaln@scitechsoft.com> wrote:
> 
>>>Honestly, at least half the time I have no idea what it's talking about.
>>>And I have a BA in Computer Science...
>>>
>>
>>  You should demand your money back, if you paid for your education ;)
> 
> Well, it *was* a U.S. degree, not a British one :-)
> 
> (ducks and runs)

Hey, remember what happened the last time the British picked a fight 
with us?...

:-D

-- 
[Reverse the parts of the e-mail address to reply.]
0
Marty
3/1/2006 6:53:06 AM
Ilya Zakharevich wrote:
> [A complimentary Cc of this posting was sent to
> Aaron Lawrence 
> <aaronlNOT@HEREconsultant.com>], who wrote in article <MPG.1e6eca869847e3b0989ec6@news.xtra.co.nz>:
> 
>>> > I don't want that silly 'Process terminated...' message
>>> > appearing every time the user hits 'q'.
>>>
>>>Not having an idea what I'm talking about: save the screen contents
>>>(Vio*), run the app which displays the message, restore the screen? 
>>
>>Of course, don't forget to save the whole buffer, regardless of how high 
>>it is (200 lines? more?). And don't forget colors. And it could be in 
>>some unexpected width, too. and... and ...
> 
> What are you trying to allude to?  That this is something difficult?
> 
> Eg. with perl you do it like
> 
>  perl -MOS2::Process -wle "$s = screen; print 'Unneeded output'; screen_set $s"
> 
> The only real problem is that the screen size could have been changed
> in between; so it is better to store/restore the size too (and this is
> as "complicated" as above...).

You get a couple of lashes too, for encouraging him.  :-)

-- 
[Reverse the parts of the e-mail address to reply.]
0
Marty
3/1/2006 6:54:51 AM
On Wed, 1 Mar 2006 06:53:06 UTC, Marty <net.comcast@martyamodeo> wrote:

> Bob Eager wrote:
> > On Tue, 28 Feb 2006 18:43:47 UTC, Michal Necasek 
> > <michaln@scitechsoft.com> wrote:
> > 
> >>>Honestly, at least half the time I have no idea what it's talking about.
> >>>And I have a BA in Computer Science...
> >>>
> >>
> >>  You should demand your money back, if you paid for your education ;)
> > 
> > Well, it *was* a U.S. degree, not a British one :-)
> > 
> > (ducks and runs)
> 
> Hey, remember what happened the last time the British picked a fight 
> with us?...

Well, I am biased...I *teach* CS degrees!

0
Bob
3/1/2006 7:32:15 AM
in 47487 20060301 065306 Marty <net.comcast@martyamodeo> wrote:
>Bob Eager wrote:
>> On Tue, 28 Feb 2006 18:43:47 UTC, Michal Necasek
>> <michaln@scitechsoft.com> wrote:
>>
>>>>Honestly, at least half the time I have no idea what it's talking about.
>>>>And I have a BA in Computer Science...
>>>>
>>>
>>>  You should demand your money back, if you paid for your education ;)
>>
>> Well, it *was* a U.S. degree, not a British one :-)
>>
>> (ducks and runs)
>
>Hey, remember what happened the last time the British picked a fight
>with us?...

Yeah, the White House got burned down.  Who's for a re-run?  ;-)
0
Bob
3/1/2006 8:44:20 AM
On 28 Feb 2006 19:49:44 GMT, Bob Eager <rde42@spamcop.net> wrote:
>> > Honestly, at least half the time I have no idea what it's talking about.
>> > And I have a BA in Computer Science...
>> >
>>   You should demand your money back, if you paid for your education ;)
>
> Well, it *was* a U.S. degree, not a British one :-)
>
> (ducks and runs)

Actually, it was a Canadian one.

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/1/2006 3:20:03 PM
On Tue, 28 Feb 2006 18:43:47 GMT, Michal Necasek <michaln@scitechsoft.com>
wrote:
>> Which leads in to the second problem: it seems to be written at a
>> technical level about five years' worth of education beyond my
>> capacity.  
> 
>   I can see that it is a problem. I have no idea how to solve it.
>
>   The problem is that people who have no clue about the product are 
> clearly in no position to write its documentation. However, people who 
> are in a position to write documentation will write something along the 
> lines of what you see, because they are very familiar with and 
> knowledgeable of the product.
>...
>   If you know how to solve this dilemma, let me know.

I don't.  I was just grumping.  

Although, more (and more comprehensive) examples might be very useful.


The biggest recent problem I had (in trying to compile one of my apps with
OW) was figuring out how to deal with DLLs and import libraries.  I still
haven't solved it.  (e.g. if I have a preexisting third-party DLL and LIB,
how do I use the LIB to access the DLL's functions, given that OW always
thinks there's an underscore appended to every function name -- which
there isn't?  Toss the LIB completely and write a LNK file that IMPORTs
every single function?  Seems like overkill.)


>> Honestly, at least half the time I have no idea what it's talking about.
>> And I have a BA in Computer Science...
>
>   You should demand your money back, if you paid for your education ;)

I won't deny my education was severely damaged by two or three dreadful
professors.  But in defense of my university, the degree program was
concentrated on design theory and development processes, not technical
details.  ("After all", said one of my profs, "that's what reference books
are for.")


>> I grant you, it's nowhere near as bad as the EMX-GCC documentation, which
>> is a classic exercise in pure unmitigated gobblegook.
> 
>   I thought the worst problem with that documentation was that it 
> largely didn't exist :P

That too, except that it's hard to understand what's there sufficiently to
recognize what's missing.  :)

Although GCC 3.x is even worse for lacking documentation...

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/1/2006 3:29:04 PM
On Tue, 28 Feb 2006 23:23:15 -0500, Michael Greene <listsnews@cox.net> wrote:
>> Anyway, compiling with OpenWatcom seems to work as a solution, so I'll
>> probably stick with that (unless I find bugs).
>
> I just looked at the source. Where is this "simplified 'man' command" 
> you have?

I'll publish it once I've written up some documentation.  It's a fairly
straightforward REXX script.

I decided I needed a MAN command that didn't require 50 external software
packages, and especially not groff.


> I noticed in the headers that Henry Spencer wrote it. I guess this is 
> the same Henry Spencer of regex fame.

I think he wrote the original 'awf' on which 'cawf' is based.  Vic Abell
wrote cawf, I believe...

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/1/2006 3:33:03 PM
Bob Martin wrote:
> in 47487 20060301 065306 Marty <net.comcast@martyamodeo> wrote:
> 
>>Bob Eager wrote:
>>
>>>On Tue, 28 Feb 2006 18:43:47 UTC, Michal Necasek
>>><michaln@scitechsoft.com> wrote:
>>>
>>>
>>>>>Honestly, at least half the time I have no idea what it's talking about.
>>>>>And I have a BA in Computer Science...
>>>>>
>>>>
>>>> You should demand your money back, if you paid for your education ;)
>>>
>>>Well, it *was* a U.S. degree, not a British one :-)
>>>
>>>(ducks and runs)
>>
>>Hey, remember what happened the last time the British picked a fight
>>with us?...
> 
> Yeah, the White House got burned down.  Who's for a re-run?  ;-)

Oh that does it.  The seas will run red with tea tonight!

-- 
[Reverse the parts of the e-mail address to reply.]
0
Marty
3/1/2006 5:01:44 PM
On Wed, 1 Mar 2006 15:20:03 UTC, Alex Taylor <mail.me@reply.to.address> 
wrote:

> On 28 Feb 2006 19:49:44 GMT, Bob Eager <rde42@spamcop.net> wrote:
> >> > Honestly, at least half the time I have no idea what it's talking about.
> >> > And I have a BA in Computer Science...
> >> >
> >>   You should demand your money back, if you paid for your education ;)
> >
> > Well, it *was* a U.S. degree, not a British one :-)
> >
> > (ducks and runs)
> 
> Actually, it was a Canadian one.

Forgot that...well, that's not *quite* as bad :-)

0
Bob
3/1/2006 6:03:07 PM
Alex Taylor wrote:

>>   If you know how to solve this dilemma, let me know.
> 
> I don't.  
> 
  Too bad ;)

> Although, more (and more comprehensive) examples might be very useful.
> 
  Examples of what? Again the problem is where to put them so that 
people find them.

> The biggest recent problem I had (in trying to compile one of my apps with
> OW) was figuring out how to deal with DLLs and import libraries.  I still
> haven't solved it.  (e.g. if I have a preexisting third-party DLL and LIB,
> how do I use the LIB to access the DLL's functions, given that OW always
> thinks there's an underscore appended to every function name -- which
> there isn't?  
 >
  The functions need to be correctly declared in header files. If a lib 
exports foo but linker is looking for foo_, it is *not* a linker issue.

  Different compilers use different default calling conventions - eg. 
VAC++, GCC, and OW each have different defaults. The linking is supposed 
to fail, because the program wouldn't work anyway.

  For DLLs that are supposed to be used by multiple compilers, it is 
good practice to use OS/2 system calling convention (_System) because 
every OS/2 compiler needs to support that.


        Michal
0
Michal
3/1/2006 8:20:25 PM
Alex Taylor wrote:
> On Tue, 28 Feb 2006 23:23:15 -0500, Michael Greene <listsnews@cox.net> wrote:
>>> Anyway, compiling with OpenWatcom seems to work as a solution, so I'll
>>> probably stick with that (unless I find bugs).
>> I just looked at the source. Where is this "simplified 'man' command" 
>> you have?
> 
> I'll publish it once I've written up some documentation.  It's a fairly
> straightforward REXX script.
> 
> I decided I needed a MAN command that didn't require 50 external software
> packages, and especially not groff.
> 
> 
>> I noticed in the headers that Henry Spencer wrote it. I guess this is 
>> the same Henry Spencer of regex fame.
> 
> I think he wrote the original 'awf' on which 'cawf' is based.  Vic Abell
> wrote cawf, I believe...
> 

Yes, you are correct and I was mistaken.

-- 
M Greene  IRC (MikeG)

<Finally getting updated>
OS/2 Stuff    : http://www.mgreene.org/os2
My OpenWatcom : http://www.mgreene.org/watcom
0
Michael
3/1/2006 11:25:39 PM
Bob Eager wrote:
> On Wed, 1 Mar 2006 15:20:03 UTC, Alex Taylor <mail.me@reply.to.address> 
> wrote:
> 
> 
>>On 28 Feb 2006 19:49:44 GMT, Bob Eager <rde42@spamcop.net> wrote:
>>
>>>>>Honestly, at least half the time I have no idea what it's talking about.
>>>>>And I have a BA in Computer Science...
>>>>>
>>>>
>>>>  You should demand your money back, if you paid for your education ;)
>>>
>>>Well, it *was* a U.S. degree, not a British one :-)
>>>
>>>(ducks and runs)
>>
>>Actually, it was a Canadian one.
> 
> Forgot that...well, that's not *quite* as bad :-)

Adding further insult!  :-P

-- 
[Reverse the parts of the e-mail address to reply.]
0
Marty
3/2/2006 2:39:45 AM
On Wed, 01 Mar 2006 20:20:25 GMT, Michal Necasek <michaln@scitechsoft.com>
wrote:
>> Although, more (and more comprehensive) examples might be very useful.
> 
>   Examples of what? Again the problem is where to put them so that 
> people find them.

Well, purely speaking for myself, some quick wcc and wlink command-line
examples at the end of the pertinent book chapters would have been
handy... like compiling common targets (32-bit PM EXE, 32-bit DLL, 
Windows EXE), link targets both with and without functions in external
DLLs, link targets using .LNK files or on the command line... I realize
some of this is there already but not consolidated or particularly
extensive.


>> The biggest recent problem I had (in trying to compile one of my apps with
>> OW) was figuring out how to deal with DLLs and import libraries.  I still
>> haven't solved it.  (e.g. if I have a preexisting third-party DLL and LIB,
>> how do I use the LIB to access the DLL's functions, given that OW always
>> thinks there's an underscore appended to every function name -- which
>> there isn't?  
> >
>   The functions need to be correctly declared in header files. If a lib 
> exports foo but linker is looking for foo_, it is *not* a linker issue.

What is 'correctly', though?  I can't tell what OW wants from me, and
that's the problem.


>   For DLLs that are supposed to be used by multiple compilers, it is 
> good practice to use OS/2 system calling convention (_System) because 
> every OS/2 compiler needs to support that.

FWIW, the functions are declared with '_System' in the header.

The DLL is the OS/2 LVM.DLL, incidentally.  The syntax of declarations in
the header file(s) is e.g.:
Drive_Control_Array _System Get_Drive_Control_Data( CARDINAL32 * Error_Code );

And I'm using a .LIB file that I believe was created from the DLL using
IMPLIB (although I've tried creating one with WLIB as well).  

OW still complains that function 'Get_Drive_Control_Data_' (to continue
that example) can't be found.


-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/2/2006 4:21:04 PM
Alex Taylor wrote:

> Well, purely speaking for myself, some quick wcc and wlink command-line
> examples at the end of the pertinent book chapters would have been
> handy... like compiling common targets (32-bit PM EXE, 32-bit DLL, 
> Windows EXE), link targets both with and without functions in external
> DLLs, link targets using .LNK files or on the command line... I realize
> some of this is there already but not consolidated or particularly
> extensive.
> 
  I see most (if not all) of this in the Programmer's Guide? But if you 
don't think it's enough, *please* contribute additional documentation. I 
can see that it can be a problem to find the right chapter in the right 
book, but I don't know how to avoid that - there's just an awful lot of 
information.

>>   The functions need to be correctly declared in header files. If a lib 
>> exports foo but linker is looking for foo_, it is *not* a linker issue.
> 
> What is 'correctly', though?  
 >
  Is that a trick question? ;) 'Correctly' means 'accurately' in this 
case. The declaration must match reality. If a function is using calling 
convention XYZ, the declaration must say so.

>>   For DLLs that are supposed to be used by multiple compilers, it is 
>> good practice to use OS/2 system calling convention (_System) because 
>> every OS/2 compiler needs to support that.
> 
> FWIW, the functions are declared with '_System' in the header.
> 
  That sounds like the correct declaration.

> The DLL is the OS/2 LVM.DLL, incidentally.  The syntax of declarations in
> the header file(s) is e.g.:
> Drive_Control_Array _System Get_Drive_Control_Data( CARDINAL32 * Error_Code );
> 
> OW still complains that function 'Get_Drive_Control_Data_' (to continue
> that example) can't be found.
>  
  Well, that does not match what you're saying. There's no way a _System 
function will get an underscore appended (unless you try extra hard). 
Try the following:

----------------------------------------------------
void _System Get_Drive_Control_Data( void );

void main( void )
{
     Get_Drive_Control_Data();
}
----------------------------------------------------

  Run wcl386 on the above. What symbol is the linker complaining about?


           Michal
0
Michal
3/2/2006 6:56:14 PM
On Thu, 02 Mar 2006 18:56:14 GMT, Michal Necasek <michaln@scitechsoft.com> wrote:
>> The DLL is the OS/2 LVM.DLL, incidentally.  The syntax of declarations in
>> the header file(s) is e.g.:
>> Drive_Control_Array _System Get_Drive_Control_Data( CARDINAL32 * Error_Code );
>> 
>> OW still complains that function 'Get_Drive_Control_Data_' (to continue
>> that example) can't be found.
>  
>   Well, that does not match what you're saying. There's no way a _System 
> function will get an underscore appended (unless you try extra hard). 
> Try the following:
--snip--

[]wcl386 test1.c -zq

Error! E2028: Get_Drive_Control_Data is an undefined reference
....


So that looks fine. 

And yet, with my own code...


[]wcc386 lvmlayer.c -bd -zq
<returns with no errors>

[]wlink @lvmlayer
Open Watcom Linker Version 1.4
Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
loading object files
searching libraries
Error! E2028: Open_LVM_Engine_ is an undefined reference
Error! E2028: Close_LVM_Engine_ is an undefined reference
Error! E2028: Get_Drive_Control_Data_ is an undefined reference
Error! E2028: Get_Drive_Status_ is an undefined reference
Error! E2028: Free_Engine_Memory_ is an undefined reference
Error! E2028: Get_Partitions_ is an undefined reference
Error! E2028: Get_Volume_Control_Data_ is an undefined reference
Error! E2028: Get_Volume_Information_ is an undefined reference
Error! E2028: Get_Partition_Information_ is an undefined reference
Error! E2028: Create_Partition_ is an undefined reference
Error! E2028: Create_Volume_ is an undefined reference
Error! E2028: Expand_Volume_ is an undefined reference
Error! E2028: Hide_Volume_ is an undefined reference
Error! E2028: Assign_Drive_Letter_ is an undefined reference
Error! E2028: Delete_Partition_ is an undefined reference
Error! E2028: Delete_Volume_ is an undefined reference
Error! E2028: Get_Boot_Manager_Menu_ is an undefined reference
Error! E2028: Get_Boot_Manager_Handle_ is an undefined reference
Error! E2028: Get_Boot_Manager_Options_ is an undefined reference
Error! E2028: Set_Boot_Manager_Options_ is an undefined reference
Error! E2028: Install_Boot_Manager_ is an undefined reference
Error! E2028: Remove_Boot_Manager_ is an undefined reference
Error! E2028: Add_To_Boot_Manager_ is an undefined reference
Error! E2028: Remove_From_Boot_Manager_ is an undefined reference
Error! E2028: Set_Startable_ is an undefined reference
Error! E2028: Get_Available_Drive_Letters_ is an undefined reference
Error! E2028: Get_Reserved_Drive_Letters_ is an undefined reference
Error! E2028: Set_Name_ is an undefined reference
Error! E2028: Refresh_LVM_Engine_ is an undefined reference
Error! E2028: Changes_Pending_ is an undefined reference
Error! E2028: Commit_Changes_ is an undefined reference
Error! E2028: Reboot_Required_ is an undefined reference
Error! E2028: New_MBR_ is an undefined reference
Error! E2028: Rediscover_PRMs_ is an undefined reference
....(goes on to complain that all of the above are undefined symbols)...


FWIW, lvmlayer.lnk contains the following:

option description '@#Alex Taylor:0.9.1#@LVM API Abstraction Layer'
system      os2v2_dll
name        lvmlayer
file        lvmlayer.obj
library     lvm.lib
EXPORT    {
            <etc>
          }

And lvmlayer #includes lvm_intr.h, which declares all of the functions
from LVM.DLL (using _System as previously noted) -- it's part of the
publically-available LVM toolkit.

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/3/2006 3:54:04 PM
In article <idHNf.18305$2O6.1924@newssvr12.news.prodigy.com>,
Michal Necasek <michaln@scitechsoft.com> wrote:

Hi Michal,

 >  Well, that does not match what you're saying. There's no way a _System
 >function will get an underscore appended (unless you try extra hard).
 >Try the following:

I was reading open watcom documentation as I wanted to (try to) use
it to build a REXX utility DLL and I found:

   The "EXPORT" directive specifies the entry points into the dynamic link
   library.  Note that the names specified in the "EXPORT" directive are
   appended with an underscore.  This is the default naming convention
   used when compiling using the register-based calling convention.
   No underscore is required when compiling using the stack-based
   calling convention.

what is the purpose of appending the underscore ? Just to warn the user
that the DLL might not be usable by programs created with other compilers ?

BTW I've not yet understood how to build a DLL without including
the C runtime...
If I'm not wrong open watcom does not understand V.AGE #pragma entry ...
Does the definition of a LibMain() function prevent the standard C
library to be included (and initialized/terminated) ?

thanks

--
bye
Alessandro
0
tin
3/3/2006 4:46:54 PM
Alex Taylor wrote:

> And lvmlayer #includes lvm_intr.h, which declares all of the functions
> from LVM.DLL (using _System as previously noted) -- it's part of the
> publically-available LVM toolkit.
> 
  What can I say? The functions are not declared as _System. If you send 
me the files necessary to reproduce the problem, I can tell you why.


        Michal
0
Michal
3/3/2006 7:04:24 PM
In <44086627$0$33412$bb4e3ad8@newscene.com>, on 03/03/2006
   at 09:54 AM, Alex Taylor <mail.me@reply.to.address> said:

>[]wcl386 test1.c -zq

>Error! E2028: Get_Drive_Control_Data is an undefined reference ....

>So that looks fine. 

>And yet, with my own code...

>[]wcc386 lvmlayer.c -bd -zq
><returns with no errors>

>[]wlink @lvmlayer

The answer is lvm_type.h lines 40 to 43.


Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
3/4/2006 12:55:33 AM
Alessandro wrote:

> what is the purpose of appending the underscore ? Just to warn the user
> that the DLL might not be usable by programs created with other compilers ?
> 
  To protect the innocent. Yes, it is so that calling convention 
mismatches are caught by the linker. It's not just an issue of other 
compilers - Open Watcom itself supports about eight calling conventions 
so there's plenty of room for trouble even using just one compiler...

> BTW I've not yet understood how to build a DLL without including
> the C runtime...
 >
  If you never call any runtime function and don't link with the -bd 
switch, the runtime won't be included.

> If I'm not wrong open watcom does not understand V.AGE #pragma entry ...
 >
  No. The wlink 'option start=<symbol>' can be used to achieve the same 
effect.

> Does the definition of a LibMain() function prevent the standard C
> library to be included (and initialized/terminated) ?
> 
  No. LibMain() is similar to IBM's _DLL_InitTerm(), but there is a 
crucial difference: _DLL_InitTerm() is the 'raw' entrypoint called by 
the OS, while LibMain() is called by the runtime. The major advantage of 
LibMain() is that the user doesn't need to know anything about the 
library internals and can call library routines from LibMain(), because 
LibMain() is called just after the runtime is inited and just before 
it's shut down. It is of course possible to override the raw entrypoint 
but most people don't need that.

  If you link with 'option nodefaultlibs', the linker won't link with 
the runtime (unless you explicitly listed the runtime lib) and will 
complain if your code is trying to call into the runtime.


        Michal
0
Michal
3/4/2006 5:09:29 AM
Alessandro schrieb:
> In article <idHNf.18305$2O6.1924@newssvr12.news.prodigy.com>,
> Michal Necasek <michaln@scitechsoft.com> wrote:
> 
> Hi Michal,
> 
>  >  Well, that does not match what you're saying. There's no way a _System
>  >function will get an underscore appended (unless you try extra hard).
>  >Try the following:
> 
> I was reading open watcom documentation as I wanted to (try to) use
> it to build a REXX utility DLL and I found:
> 
>    The "EXPORT" directive specifies the entry points into the dynamic link
>    library.  Note that the names specified in the "EXPORT" directive are
>    appended with an underscore.  This is the default naming convention
>    used when compiling using the register-based calling convention.
>    No underscore is required when compiling using the stack-based
>    calling convention.
> 
> what is the purpose of appending the underscore ? Just to warn the user
> that the DLL might not be usable by programs created with other compilers ?

Apart from calling convention issues:
If you use the EXPORT directive, you should have complete control over 
what routine name is exported to the outside world as it allows to map 
an internal name to an arbitrary external name:

EXPORT
	TheOutsideName.1=_TheInsideName RESIDENT

Lars
0
Lars
3/4/2006 9:19:31 AM
On Sat, 4 Mar 2006 00:55:33 UTC, Steven Levine <steve53@earthlink.bogus.net> wrote:

> The answer is lvm_type.h lines 40 to 43.

Oh, for... !

.... thanks.  :)


Is it just me, or is that a really dumb thing for it to do?

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/4/2006 4:58:02 PM
On Fri, 3 Mar 2006 19:04:24 UTC, Michal Necasek <michaln@scitechsoft.com> wrote:

> > And lvmlayer #includes lvm_intr.h, which declares all of the functions
> > from LVM.DLL (using _System as previously noted) -- it's part of the
> > publically-available LVM toolkit.
> > 
>   What can I say? The functions are not declared as _System. If you send 
> me the files necessary to reproduce the problem, I can tell you why.

Steve found the culprit.  lvm_intr.h #includes lvm_type.h, which has this
nice little preprocessor snippet:

#if defined(__IBMCPP__) || defined(__IBMC__)
#else
#define _System
#endif


-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/4/2006 4:58:03 PM
On Sat, 4 Mar 2006 00:55:33 UTC, Steven Levine <steve53@earthlink.bogus.net> wrote:

> The answer is lvm_type.h lines 40 to 43.

I might want to change this in my distribution of the LVM Toolkit, because
it's bound to bite other people (am I right?)...

Do you think replacing it with the following would be suitable?

#ifndef _System 
    #define _System
#endif

Or is there a better idea?

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/4/2006 5:02:03 PM
On 4 Mar 2006 11:02:03 -0600, Alex Taylor <mail.me@reply.to.address> wrote:

>> The answer is lvm_type.h lines 40 to 43.
> 
> I might want to change this in my distribution of the LVM Toolkit, because
> it's bound to bite other people (am I right?)...
> 
> Do you think replacing it with the following would be suitable?

No.

> #ifndef _System 
>     #define _System
> #endif
> 
> Or is there a better idea?

Implementation specific behaviour shouldn't have any place whatsoever in
a general purpose multi-platform (compiler-wise) library IMHO.
I would take it out altogether.
If some other compiler can't handle _System, then it is up to the compiler
(or more probably the user via a switch) to sort the mess out. It is
certainly not the LVM toolkit's responsibility.
0
Paul
3/4/2006 6:23:28 PM
Alex Taylor wrote:

> I might want to change this in my distribution of the LVM Toolkit, because
> it's bound to bite other people (am I right?)...
> 
  Yes. It was an extremely foolish idea to have the #ifdef in there the 
way it is. The calling convention specifier for external functions is in 
no way optional - compilers may have different ways to specify it, but 
they all have some way to do it.

> Do you think replacing it with the following would be suitable?
> 
> #ifndef _System 
>     #define _System
> #endif
> 
  Probably not, because _System may be a keyword.

> Or is there a better idea?
> 
  There are not *that* many OS/2 compilers, and most of them support 
_System, either as a keyword or as a macro.


         Michal
0
Michal
3/4/2006 6:34:46 PM
In <EzI08Q3LwTQm-pn2-OdnRKD9t5W8d@localhost>, on 03/04/2006
   at 10:58 AM, "Alex Taylor" <mail.me@reply.to.address> said:


>Is it just me, or is that a really dumb thing for it to do?

It's an attempt a making the code compiler agnostic.  Unfortunately, the
implementation is not the best.  I do not believe taking actions of this
type in the absence of information. In this case, I would, as others
suggested, remove the definition.

There is a place for this kind of defintion

#if defined(__SOMEODDC__)
define _System _OddSystem
#endif

Here we take explicit action because we know what the compiler really
needs.

Regards,

Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
3/4/2006 9:31:46 PM
Steven Levine wrote:

>> Is it just me, or is that a really dumb thing for it to do?
> 
> It's an attempt a making the code compiler agnostic.  Unfortunately, the
> implementation is not the best.  
 >
  I would go so far as to say that it's quite bad, because it's likely 
to break all compilers except IBM's.

> I do not believe taking actions of this
> type in the absence of information. In this case, I would, as others
> suggested, remove the definition.
> 
  The other possibility is something like this:

#ifdef __IBMC__
     /* do VAC++ stuff */
#elif defined __OTHERCOMPILER__
     /* do other stuff */
#else
     #error this needs fixing
#endif

  That at least gives people who don't build with the "right" compiler a 
not-easy-to-miss hint that something needs to be done before the code 
can work.

  Generally, quiet failures are extremely bad idea - they compound to a 
problem instead of helping solve it.


         Michal
0
Michal
3/4/2006 9:56:21 PM
In <92oOf.20608$tb3.11874@newssvr24.news.prodigy.net>, on 03/04/2006
   at 09:56 PM, Michal Necasek <michaln@prodigy.net> said:

>  I would go so far as to say that it's quite bad, because it's likely 
>to break all compilers except IBM's.

A bit more thought about the code, makes me tend to agree with you.  One
work around would be to force the System calling convention from the
command line, but that is pretty likely to break other code.

>#ifdef __IBMC__
>     /* do VAC++ stuff */
>#elif defined __OTHERCOMPILER__
>     /* do other stuff */
>#else
>     #error this needs fixing
>#endif

>  That at least gives people who don't build with the "right" compiler a 
>not-easy-to-miss hint that something needs to be done before the code 
>can work.

This is fine in general.  In the specific case of Alex's problem, it would
be better for the code to do nothing.  I can't think of an OS/2 compiler
that does not support _System.


Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
3/5/2006 4:23:00 AM
In article <di9Of.65662$PL5.27114@newssvr11.news.prodigy.com>,
Michal Necasek <michaln@scitechsoft.com> wrote:

 >> Does the definition of a LibMain() function prevent the standard C
 >> library to be included (and initialized/terminated) ?
 >>
 >  No. LibMain() is similar to IBM's _DLL_InitTerm(), but there is a

[...]

thanks... now everything seems clear :-)

--
bye
Alessandro
0
tin
3/5/2006 5:43:11 AM
On Sun, 5 Mar 2006 04:23:00 UTC, Steven Levine 
<steve53@earthlink.bogus.net> wrote:

> I can't think of an OS/2 compiler
> that does not support _System.

Borland. It uses __syscall instead and requires a 
different way to define a pointer to such a function:

void (__syscall *MyFunction)(void);	// Borland

vs

void (* _System MyFunction)(void);	// IBM



-- 
Ruediger "Rudi" Ihle [S&T Systemtechnik GmbH, Germany]
http://www.s-t.de
Please remove all characters left of the "R" in my email address

0
Ruediger
3/5/2006 7:01:28 AM
Ruediger Ihle wrote:

> Borland. It uses __syscall instead and requires a 
> different way to define a pointer to such a function:
> 
> void (__syscall *MyFunction)(void);	// Borland
> 
  I guess Borland didn't care about compiling IBM's Toolkit headers... 
how are you supposed to do things like use TCP/IP with Borland?

  I wonder where the __syscall spelling came from. Watcom supports it as 
an alias for _System (or maybe vice versa) but I don't think I've seen 
__syscall actually used anywhere.

> vs
> 
> void (* _System MyFunction)(void);	// IBM
> 
  Only IBM does function pointers that way. Everyone else (I know of) 
does it the same way as Borland.

  The IBM way is brain damaged because it does not allow for a semantic 
difference between

  void <modifier> * foo;

and

  void * <modifier> foo;

which is often useful (and crucial with near/far pointers).


       Michal
0
Michal
3/5/2006 7:20:11 AM
On Sun, 5 Mar 2006 07:20:11 UTC, Michal Necasek <michaln@prodigy.net> 
wrote:

> I guess Borland didn't care about compiling IBM's Toolkit headers... 

They supplied there own version of the headers. But the only changes
are in OS2DEF.H (_System, _Far16 etc) and REXXSAA.H (_Packed).


> how are you supposed to do things like use TCP/IP with Borland?

I think this was not so much an issue at the time the product was
released. It can, however, be done by re-defining _System. So you
only get the same problems as with WATCOM (for example errno.h vs
nerrno.h conflicts).


-- 
Ruediger "Rudi" Ihle [S&T Systemtechnik GmbH, Germany]
http://www.s-t.de
Please remove all characters left of the "R" in my email address

0
Ruediger
3/5/2006 4:08:48 PM
In <Bd1D8ggkpXsj-pn2-1Z5LDmbjEdEu@Rudi4>, on 03/05/2006
   at 04:08 PM, "Ruediger Ihle" <NO_SPAM_R.Ihle@S-t.De> said:

>They supplied there own version of the headers. But the only changes are
>in OS2DEF.H (_System, _Far16 etc) and REXXSAA.H (_Packed).

Turns out there is specific documentation for this.
 http://www.edm2.com/index.php/How_to_setup_old_Borland_C_for_use_with_eComStation_Toolkit

>I think this was not so much an issue at the time the product was
>released. It can, however, be done by re-defining _System. So you only
>get the same problems as with WATCOM (for example errno.h vs nerrno.h
>conflicts).

The mail/newsreader I use is an example that with some header
modifications Borland can do TCP/IP just fine. :-)

Steven

-- 
--------------------------------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>  MR2/ICE 2.67 #10183
Warp/eCS/DIY/14.103a_W4 www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------

0
Steven
3/5/2006 4:39:50 PM
On Sat, 04 Mar 2006 21:56:21 GMT, Michal Necasek <michaln@prodigy.net> wrote:
>> I do not believe taking actions of this
>> type in the absence of information. In this case, I would, as others
>> suggested, remove the definition.
>> 
>   The other possibility is something like this:
>
> #ifdef __IBMC__
>      /* do VAC++ stuff */
> #elif defined __OTHERCOMPILER__
>      /* do other stuff */
> #else
>      #error this needs fixing
> #endif
>
>   That at least gives people who don't build with the "right" compiler a 
> not-easy-to-miss hint that something needs to be done before the code 
> can work.

I assume taking it out would work just as well, because any compiler that
doesn't define _System would barf anyway.

I guess the only possibility would be if there's some compiler that does
define _System but in an incompatible way... but I don't think there are
any that do, right?


-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/6/2006 4:47:15 PM
On Sat, 04 Mar 2006 18:34:46 GMT, Michal Necasek <michaln@prodigy.net> wrote:
>> I might want to change this in my distribution of the LVM Toolkit, because
>> it's bound to bite other people (am I right?)...
>> 
>   Yes. It was an extremely foolish idea to have the #ifdef in there the 
> way it is. The calling convention specifier for external functions is in 
> no way optional - compilers may have different ways to specify it, but 
> they all have some way to do it.

OK, I'll just take it out next time I update the toolkit.  (Soon, I hope.)

Thanks for all the help, guys!

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/6/2006 4:49:03 PM
Alex Taylor wrote:

> I guess the only possibility would be if there's some compiler that does
> define _System but in an incompatible way... but I don't think there are
> any that do, right?
> 
  It would be a breathtakingly stupid thing to do. If there was such a 
compiler (which I highly doubt), it should certainly be avoided ;)


           Michal
0
Michal
3/6/2006 6:58:14 PM
On 6 Mar 2006 10:49:03 -0600, Alex Taylor <mail.me@reply.to.address> wrote:
>>> I might want to change this in my distribution of the LVM Toolkit, because
>>> it's bound to bite other people (am I right?)...
>>> 
>>   Yes. It was an extremely foolish idea to have the #ifdef in there the 
>> way it is. The calling convention specifier for external functions is in 
>> no way optional - compilers may have different ways to specify it, but 
>> they all have some way to do it.
>
> OK, I'll just take it out next time I update the toolkit.  (Soon, I hope.)

I've updated the LVM Toolkit distribution; now available on Hobbes (or my
own website).  Besides the above fix, I also took the opportunity to put
in some updates to the INF documentation that I've been sitting on for
ages without uploading...

Assuming anybody besides me actually uses this toolkit, does anyone think
I should modify the INF documentation layout to more closely reflect the
standard IBM toolkit style?

Right now, the documentation is organized by what header file each
function, data type or declaration is located in (which roughly reflects
how commonly-used the various items are).  I'm considering changing that
so that all functions are in one section, all constants are in one
section, all types are in one section, etc.  Does anyone think it's worth
the effort?

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/9/2006 4:09:01 PM
On Wed, 1 Mar 2006 15:33:03 UTC, Alex Taylor <mail.me@reply.to.address> wrote:

> > I just looked at the source. Where is this "simplified 'man' command" 
> > you have?
> 
> I'll publish it once I've written up some documentation.  It's a fairly
> straightforward REXX script.
> 
> I decided I needed a MAN command that didn't require 50 external software
> packages, and especially not groff.

It's in Hobbes /pub/new now, BTW (simpleman.zip).

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/10/2006 11:23:07 PM
On 9 Mar 2006 10:09:01 -0600, Alex Taylor <mail.me@reply.to.address> wrote:

> Right now, the documentation is organized by what header file each
> function, data type or declaration is located in (which roughly reflects
> how commonly-used the various items are).  I'm considering changing that
> so that all functions are in one section, all constants are in one
> section, all types are in one section, etc.  Does anyone think it's worth
> the effort?

Probably not. The information is there - that is what matters.
0
Paul
3/12/2006 6:05:18 PM
On Thu, 9 Mar 2006 16:09:01 UTC, Alex Taylor <mail.me@reply.to.address> wrote:
Hi Alex,

> I've updated the LVM Toolkit distribution; now available on Hobbes (or my
> own website).  Besides the above fix, I also took the opportunity to put
> in some updates to the INF documentation that I've been sitting on for
> ages without uploading...

OK, thanks, will get the update then ...

 
> Assuming anybody besides me actually uses this toolkit, 

I do, allthough I use it as reference information.
I do not use the header directly or link with it.

Since I want (need :-) to use the LVM.DLL conditionally,
and do not want to fail loading my program when it does
not exist (Warp 4 or older OS/2) I use dynamic loading
of the LVM.DLL so I have my own code defining those
interfaces.


However, your toolkit was very helpful in defining those :-)

I will send you a code snippet by private email on how to do that, 
would you ever need to do it yourself ...

(Note: all compiled and linked by OpenWatcom of course :-)


>does anyone think
> I should modify the INF documentation layout to more closely reflect the
> standard IBM toolkit style?
  
I think that would be a wast of time, as long as the info is there,
a good GREP should find it :-) 

Regards, JvW

-- 
Jan van Wijk; Author of DFSee: http://www.dfsee.com

0
Jan
3/14/2006 9:18:46 AM
On 14 Mar 2006 09:18:46 GMT, Jan van Wijk <jvw.no.spam@dfsee.com> wrote:
>> Assuming anybody besides me actually uses this toolkit, 
>
> I do, allthough I use it as reference information.
> I do not use the header directly or link with it.

That's fine, almost all my work went into the documentation anyway. :)


> Since I want (need :-) to use the LVM.DLL conditionally,
> and do not want to fail loading my program when it does
> not exist (Warp 4 or older OS/2) I use dynamic loading
> of the LVM.DLL so I have my own code defining those
> interfaces.
>
> However, your toolkit was very helpful in defining those :-)

Alternatively, you might have been able to use the IOCtl interface
to LVM, which I believe IBM actually documents for developers.  But
I've never looked at it myself.


> I will send you a code snippet by private email on how to do that, 
> would you ever need to do it yourself ...
>
> (Note: all compiled and linked by OpenWatcom of course :-)

Got it, thanks.  I'll pore over it when I have some time.


>> I should modify the INF documentation layout to more closely reflect the
>> standard IBM toolkit style?
>   
> I think that would be a wast of time, as long as the info is there,
> a good GREP should find it :-) 

OK.  Seems to be the consensus that it's not worth it.

What I think I will do, next time the update-mood strikes me, is link the
data types in the function summaries to the appropriate page.  If nothing
else, flipping back and forth through the table of contents is a nuisance
(although much easier with NewView).

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/14/2006 4:07:02 PM
On 14 Mar 2006 10:07:02 -0600, Alex Taylor <mail.me@reply.to.address> wrote:

> Alternatively, you might have been able to use the IOCtl interface
> to LVM, which I believe IBM actually documents for developers.

Do you know where?
0
Paul
3/14/2006 6:55:59 PM
On Tue, 14 Mar 2006 18:55:59 GMT, Paul Ratcliffe
<abuse@orac12.clara34.co56.uk78> wrote:
>> Alternatively, you might have been able to use the IOCtl interface
>> to LVM, which I believe IBM actually documents for developers.
>
> Do you know where?

I think it was in ADDENDUM.INF?

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/15/2006 3:37:05 PM
On Wed, 15 Mar 2006 15:37:05 UTC, Alex Taylor <mail.me@reply.to.address>
wrote:

> On Tue, 14 Mar 2006 18:55:59 GMT, Paul Ratcliffe
> <abuse@orac12.clara34.co56.uk78> wrote:
> >> Alternatively, you might have been able to use the IOCtl interface
> >> to LVM, which I believe IBM actually documents for developers.
> >
> > Do you know where?
> 
> I think it was in ADDENDUM.INF?

That one only really covers the bad block stuff, AFAICS.

0
Bob
3/15/2006 3:47:41 PM
On 15 Mar 2006 15:47:41 GMT, Bob Eager <rde42@spamcop.net> wrote:
>> >> Alternatively, you might have been able to use the IOCtl interface
>> >> to LVM, which I believe IBM actually documents for developers.
>> >
>> > Do you know where?
>> 
>> I think it was in ADDENDUM.INF?
>
> That one only really covers the bad block stuff, AFAICS.

Ah.  Well, like I said (I think), I never really looked at it beyond
noticing it was mentioned.

-- 
Alex Taylor                                        
http://www.cs-club.org/~alex

Remove hat to reply (reply-to address).
0
Alex
3/16/2006 4:03:14 PM
Reply:

Similar Artilces:

""""""""""""""""""""""ADD ME""""""""""""""""""""
Hi , Hope you are doing great. Please let me take this opportunity to introduce myself, Iam Karthik working with BhanInfo Inc, a NY based company. We have consultants on our bench on various technologies, my request is to add me to your distribution list and kindly do send me the requirements. i have the below list available 1. Mainframe 2. Java 3.. Financial Analyst 4. Data Architect If there is any vendor ship agreement which has to be signed then I would like to take an opportunity to represent my company and expect your cooperation... We look forward to build a ve...

"""""""""ADD ME""""""""""
Hi , Hope you are doing great. Please let me take this opportunity to introduce myself, Iam Karthik working with BhanInfoi Inc, a NY based company. We have consultants on our bench on various technologies, my request is to add me to your distribution list and kindly do send me the requirements. i have the below list available 1. Mainframe 2. Java 3.. Financial Analyst 4. Data Architect If there is any vendor ship agreement which has to be signed then I would like to take an opportunity to represent my company and expect your cooperation... ...

Urgent Requirement in """""""""""""NEW YORK""""""""""""""""
Hello Partners, Please find the requirement below. Please send the updated resume along with rate and contact no. REQ#1: Title : Java Developer ( Rating Project) Duration : 6 months Rate : open Location : NY strong java, WebLogic 9.2, Web Services, Oracle REQ#2: Title : Java Developer Duration : 4 months Rate : open Location : NY Strong java, SQL REQ#3: Title : VB.Net Consultant Location : NY Duration : 4 months Rate : open Primarily looking at someone who has Excel, VB.net a...

"or" and "and"
Hi, I'm just getting to discover ruby, but I find it very nice programming language. I just still don't understand how the "or" and "and" in ruby... I was playing with ruby and for example made a def to print Stem and Leaf plot (for those who didn't have a statistics course or slept on it, e.g. http://cnx.org/content/m10157/latest/) Here is the Beta version of it: class Array def n ; self.size ; end def stem_and_leaf(st = 1) # if st != (2 or 5 or 10) then ; st = 1 ; end k = Hash.new(0) self.each {|x| k[x.to_f] += 1 } k = k.sort{|a, b| a[0].to_f <=&g...

"/a" is not "/a" ?
Hi everybody, while testing a module today I stumbled on something that I can work around but I don't quite understand. >>> a = "a" >>> b = "a" >>> a == b True >>> a is b True >>> c = "/a" >>> d = "/a" >>> c == d True # all good so far >>> c is d False # eeeeek! Why c and d point to two different objects with an identical string content rather than the same object? Manu Emanuele D'Arrigo wrote: >>>> c = "/a" >>>&...

"out" and "in out"
Hi i found the following explaination: In Ada, "in" parameters are similar to C++ const parameters. They are effectively read-only within the scope of the called subprogram. Ada "in out" parameters have a reliable initial value (that passed in from the calling subprogram) and may be modified within the scope of the called procedure. Ada "out" parameters have no reliable initial value, but are expected to be assigned a value within the called procedure. What does "have no reliable initial value" mean when considering the "out" parameter? By c...

about "++" and "--"
why this program snippet display "8,7,7,8,-7,-8" the program is: main() { int i=8; printf("%d\n%d\n%d\n%d\n%d\n%d\n",++i,--i,i++,i--,-i++,-i--); } > why this program snippet display "8,7,7,8,-7,-8" Ask your compiler-vendor because this result is IMHO implementation-defined. Check this out: http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.15 http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.16 Regards, Irina Marudina fxc123@gmail.com wrote: > why this program snippet display "8,7,7,8,-7,-8&q...

"If then; if then;" and "If then; if;"
I have a raw data set which is a hierarchical file: H 321 s. main st P Mary E 21 F P william m 23 M P Susan K 3 F H 324 S. Main St I use the folowing code to read the data to creat one observation per detail(P) record including hearder record(H): data test; infile 'C:\Documents and Settings\retain.txt'; retain Address; input type $1. @; if type='H' then input @3 Address $12.; if type='P' then input @3 Name $10. @13 Age 3. @16 Gender $1.; run; but the output is not what I want: 1 321 s. main H 2 321 s. main P Mary E 21 F 3 321 s...

why "::", not "."
Why does the method of modules use a dot, and the constants a double colon? e.g. Math::PI and Math.cos -- Posted via http://www.ruby-forum.com/. On Oct 26, 2010, at 01:48 , Oleg Igor wrote: > Why does the method of modules use a dot, and the constants a double > colon? > e.g. > Math::PI and Math.cos For the same reason why inner-classes/modules use double colon, because = they're constants and that's how you look up via constant namespace. Math::PI and ActiveRecord::Base are the same type of lookup... it is = just that Base is a module and PI is a float....

"my" and "our"
Hi, while testing a program, I erroneously declared the same variable twice within a block, the first time with "my", the second time with "our": { my $fz = 'VTX_Link'; .... ( around 200 lines of code, all in the same block) our $fz = 'VTX_Linkset'; ... } So the initial contents of the $fz declared with "my" is lost, because "our" creates a lexical alias for the global $fz, thus overwriting the previous "my" declaration. It was my error, no question. But I wonder why Perl doesn't mention this - even with "use s...

"C" programm in "Matlab" Programm
Hi, i habe a matlab code which is looking like that " in C: unsigned char i, Checksum; unsigned char Command[9]; //Set the “Command” array to the desired command Checksum = Command[0]; for(i=1; i<8; i++) Checksum+=Command[i]; Command[8]=Checksum; //insert checksum as last byte of the command //Now, send it to the module how can i convert it to matlab? thanks for you answer melano "Miland " <miland17@yahoo.de> wrote in message <j0mb4f$48u$1@newscl01ah.mathworks.com>... > Hi, > i habe a matlab code which is looking like that "...

Urgent Requirement for """""""""""""""INFORMATICA DEVELOPER"""""""""""""
Hello Partners, How are you ? Please find the requirements below. Title: Database/ETL Developer Duration: 6 months Location: NY Exp: 7+ Locals preferred Database/ETL requirements (Mandatory) Candidate must have worked with financial instruments, preferably Mutual Funds but, Equities are also ok. PL/SQL - packages, Stored procs, Functions, Aggregate functions, Pipelined Functions Informatica 8.6 - especially complex mappings, complex maplets, complex workflows, transformations Oracle 10g/11g Unix/Linux shell scripting ...

Urgent need """""""""""INFORMATICA DEVELOPER"""""""""""""
Hello Partners, How are you ? Please find the requirements below. Title: Database/ETL Developer Duration: 6 months Location: NY Exp: 7+ Locals preferred Database/ETL requirements (Mandatory) Candidate must have worked with financial instruments, preferably Mutual Funds but, Equities are also ok. PL/SQL - packages, Stored procs, Functions, Aggregate functions, Pipelined Functions Informatica 8.6 - especially complex mappings, complex maplets, complex workflows, transformations Oracle 10g/11g Unix/Linux shell scripting Database/ETL requirements (Optional) ...

Does it need a ";" at the very after of "if" and "for"
write code like: int main(void) { int a=10; if(a<20) {} } Compiler ok on dev-cpp . don't we have to add a ";" after if statement? marsarden said: > write code like: > > int main(void) > { > int a=10; > if(a<20) > {} > } > > Compiler ok on dev-cpp . don't we have to add a ";" after if > statement? The syntax for 'if' is: if(expression) statement There is no semicolon after the ) but before the statement. The statement is either a normal statement (which can be empty), ending in a semicolon:- if(expr) ...

Web resources about - "Process terminated by SIGINT"? - comp.os.os2.programmer.misc

Resources last updated: 1/31/2016 3:54:54 AM