9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] X11
@ 2013-02-28 14:15 Steve Simon
  2013-02-28 14:21 ` Charles Forsyth
  2013-02-28 23:02 ` [9fans] X11 [was APE select and awkward Python subprocess PIPEfitting] Jeff Sickel
  0 siblings, 2 replies; 11+ messages in thread
From: Steve Simon @ 2013-02-28 14:15 UTC (permalink / raw)
  To: 9fans, jas

I have rebuilt equis with the change in ape's select
and it seems to work fine (tested with xlock and xterm only).

this was not quite straightforward due to changes in ape, and
the compiler becomming a little stricter.

On this subject, what is the general feeling on integer
type'ed functions which call exit() before falling off the
end of the function?

This is fairly common in X11 and I have just added a return 0 on
the end to push the code through the compiler, but should the
compiler be taught about this case?

if so, it gets a bit nasty as this feature is named
exit() under ape and exits() in native plan9.

Personally I think falling of the end of a function
is a bug and should be  fixed, but perhaps it should
just be a warning rather than an error to make
building foreign code simpler.

-Steve



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] X11
  2013-02-28 14:15 [9fans] X11 Steve Simon
@ 2013-02-28 14:21 ` Charles Forsyth
  2013-02-28 17:19   ` dexen deVries
  2013-02-28 23:02 ` [9fans] X11 [was APE select and awkward Python subprocess PIPEfitting] Jeff Sickel
  1 sibling, 1 reply; 11+ messages in thread
From: Charles Forsyth @ 2013-02-28 14:21 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs; +Cc: Jeff Sickel

[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]

ANSI C has a "_Noreturn" attribute that I started to implement,
but I think I might fall back to a #pragma, which would be quicker to do.



On 28 February 2013 14:15, Steve Simon <steve@quintile.net> wrote:

> I have rebuilt equis with the change in ape's select
> and it seems to work fine (tested with xlock and xterm only).
>
> this was not quite straightforward due to changes in ape, and
> the compiler becomming a little stricter.
>
> On this subject, what is the general feeling on integer
> type'ed functions which call exit() before falling off the
> end of the function?
>
> This is fairly common in X11 and I have just added a return 0 on
> the end to push the code through the compiler, but should the
> compiler be taught about this case?
>
> if so, it gets a bit nasty as this feature is named
> exit() under ape and exits() in native plan9.
>
> Personally I think falling of the end of a function
> is a bug and should be  fixed, but perhaps it should
> just be a warning rather than an error to make
> building foreign code simpler.
>
> -Steve
>
>

[-- Attachment #2: Type: text/html, Size: 1554 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] X11
  2013-02-28 14:21 ` Charles Forsyth
@ 2013-02-28 17:19   ` dexen deVries
  2013-02-28 18:10     ` Joel C. Salomon
  0 siblings, 1 reply; 11+ messages in thread
From: dexen deVries @ 2013-02-28 17:19 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Thursday 28 of February 2013 14:21:08 Charles Forsyth wrote:
> ANSI C has a "_Noreturn" attribute that I started to implement,
> but I think I might fall back to a #pragma, which would be quicker to do.

another quick hack:

#define exit(status) do { exit(status); return 0; } while (0)

with do{}while() guarding against treating it as an expression.


-- 
dexen deVries

[[[↓][→]]]




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] X11
  2013-02-28 17:19   ` dexen deVries
@ 2013-02-28 18:10     ` Joel C. Salomon
  2013-02-28 19:46       ` Steve Simon
  2013-03-01 13:05       ` Comeau At9Fans
  0 siblings, 2 replies; 11+ messages in thread
From: Joel C. Salomon @ 2013-02-28 18:10 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Thu, Feb 28, 2013 at 12:19 PM, dexen deVries <dexen.devries@gmail.com> wrote:
> #define exit(status) do { exit(status); return 0; } while (0)

What does kenc do with a void function attempting to return 0?

—Joel



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] X11
  2013-02-28 18:10     ` Joel C. Salomon
@ 2013-02-28 19:46       ` Steve Simon
  2013-03-01  4:11         ` Federico G. Benavento
  2013-03-01 13:05       ` Comeau At9Fans
  1 sibling, 1 reply; 11+ messages in thread
From: Steve Simon @ 2013-02-28 19:46 UTC (permalink / raw)
  To: 9fans

> What does kenc do with a void function attempting to return 0?

t.c:6 incompatible types: "VOID" and "INT" for op "RETURN"

-Steve



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] X11 [was APE select and awkward Python subprocess PIPEfitting]
  2013-02-28 14:15 [9fans] X11 Steve Simon
  2013-02-28 14:21 ` Charles Forsyth
@ 2013-02-28 23:02 ` Jeff Sickel
  2013-02-28 23:13   ` Charles Forsyth
  1 sibling, 1 reply; 11+ messages in thread
From: Jeff Sickel @ 2013-02-28 23:02 UTC (permalink / raw)
  To: 9fans

I've submitted a patch, ape-select, that just removes the
offending EBADF.  If there's a desire to up the FD_SETSIZE
to 1024 like everyone else, we should address that as a
separate patch and modernize the <sys/select.h> in the
process.

-jas




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] X11 [was APE select and awkward Python subprocess PIPEfitting]
  2013-02-28 23:02 ` [9fans] X11 [was APE select and awkward Python subprocess PIPEfitting] Jeff Sickel
@ 2013-02-28 23:13   ` Charles Forsyth
  0 siblings, 0 replies; 11+ messages in thread
From: Charles Forsyth @ 2013-02-28 23:13 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 355 bytes --]

On 28 February 2013 23:02, Jeff Sickel <jas@corpus-callosum.com> wrote:

> that just removes the
> offending EBADF
>

it should generate EBADF for any bit set in any of the fd_sets when that
bit doesn't correspond to an open file descriptor.
the mistake was producing EBADF on a very specific condition associated
with an *open* file descriptor

[-- Attachment #2: Type: text/html, Size: 730 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] X11
  2013-02-28 19:46       ` Steve Simon
@ 2013-03-01  4:11         ` Federico G. Benavento
  0 siblings, 0 replies; 11+ messages in thread
From: Federico G. Benavento @ 2013-03-01  4:11 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

thanks steve

On Thu, Feb 28, 2013 at 4:46 PM, Steve Simon <steve@quintile.net> wrote:
>> What does kenc do with a void function attempting to return 0?
>
> t.c:6 incompatible types: "VOID" and "INT" for op "RETURN"
>
> -Steve
>



--
Federico G. Benavento



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] X11
  2013-02-28 18:10     ` Joel C. Salomon
  2013-02-28 19:46       ` Steve Simon
@ 2013-03-01 13:05       ` Comeau At9Fans
  1 sibling, 0 replies; 11+ messages in thread
From: Comeau At9Fans @ 2013-03-01 13:05 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Thu, Feb 28, 2013 at 1:10 PM, Joel C. Salomon <joelcsalomon@gmail.com> wrote:
>
> On Thu, Feb 28, 2013 at 12:19 PM, dexen deVries <dexen.devries@gmail.com> wrote:
> > #define exit(status) do { exit(status); return 0; } while (0)
> What does kenc do with a void function attempting to return 0?

incompatible types: "VOID" and "INT" for op "RETURN"

There isn't a perfect solution considering existing code etc but
similarly can be diagnosed in Steve's case, more along the lines of:

warning: missing return statement at end of non-void function "foo"

--
Greg Comeau / 4.3.10.1 with C++0xisms now in beta!
Comeau C/C++ ONLINE ==>     http://www.comeaucomputing.com/tryitout
World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] x11
  2004-06-02 23:39 [9fans] x11 treilov
@ 2004-06-03  8:56 ` plan9
  0 siblings, 0 replies; 11+ messages in thread
From: plan9 @ 2004-06-03  8:56 UTC (permalink / raw)
  To: 9fans

treilov@hush.com wrote:
> not a plan9 question, but i am curious to know what the other folks on
> the list use with x11 as a window manager?

rio, obviously

Robby



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [9fans] x11
@ 2004-06-02 23:39 treilov
  2004-06-03  8:56 ` plan9
  0 siblings, 1 reply; 11+ messages in thread
From: treilov @ 2004-06-02 23:39 UTC (permalink / raw)
  To: 9fans

i have been using plan9 for a while now and love the
interface.  the power and consistency are fantastic.
i wanted to thank everybody who has contributed to plan9
for creating it.

not a plan9 question, but i am curious to know what the other folks on
the list use with x11 as a window manager?



Concerned about your privacy? Follow this link to get
FREE encrypted email: https://www.hushmail.com/?l=2

Free, ultra-private instant messaging with Hush Messenger
https://www.hushmail.com/services.php?subloc=messenger&l=434

Promote security and make money with the Hushmail Affiliate Program: 
https://www.hushmail.com/about.php?subloc=affiliate&l=427


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-03-01 13:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-28 14:15 [9fans] X11 Steve Simon
2013-02-28 14:21 ` Charles Forsyth
2013-02-28 17:19   ` dexen deVries
2013-02-28 18:10     ` Joel C. Salomon
2013-02-28 19:46       ` Steve Simon
2013-03-01  4:11         ` Federico G. Benavento
2013-03-01 13:05       ` Comeau At9Fans
2013-02-28 23:02 ` [9fans] X11 [was APE select and awkward Python subprocess PIPEfitting] Jeff Sickel
2013-02-28 23:13   ` Charles Forsyth
  -- strict thread matches above, loose matches on Subject: below --
2004-06-02 23:39 [9fans] x11 treilov
2004-06-03  8:56 ` plan9

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).