POV-Ray : Newsgroups : povray.binaries.images : HSL HSV colors.inc fopah Server Time
28 Mar 2024 13:11:52 EDT (-0400)
  HSL HSV colors.inc fopah (Message 11 to 18 of 18)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: jr
Subject: Re: HSL HSV colors.inc fopah
Date: 30 Dec 2019 09:55:01
Message: <web.5e0a0e2cffbdd818c662f470@news.povray.org>
hi,

"Melody" <nomail@nomail> wrote:
> "Cousin Ricky" <rickysttATyahooDOTcom> wrote:
>
> > I avoid Windblows of *any* flavor.  ...
>
> win7 is the promised land.


there once was a man named Bill,
whose programs made users ill.
he though, completely undeterred,
became rich as a king, the uber nerd,
and kept bending the world to his will.

;-)


regards, jr.


Post a reply to this message

From: Bald Eagle
Subject: Re: HSL HSV colors.inc fopah
Date: 30 Dec 2019 15:55:01
Message: <web.5e0a6373ffbdd814eec112d0@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:

> there once was a man named Bill,
> whose programs made users ill.
> he though, completely undeterred,
> became rich as a king, the uber nerd,
> and kept bending the world to his will.

https://www.youtube.com/watch?v=pQocN_c2uLI


Post a reply to this message

From: Melody
Subject: Re: HSL HSV colors.inc fopah
Date: 30 Dec 2019 22:50:01
Message: <web.5e0ac35dffbdd819da690110@news.povray.org>
"Melody" <nomail@nomail> wrote:
> libpthreadGC2.a pthreadGC2.dll
>
> #include <pthread.h>
> #include <unistd.h>

C:\mirc614\irc\timer.h|32|warning: control reaches end of non-void function
[-Wreturn-type]

whats the fix for that warning? for this "non-void function"
??? compiler wont allow returning anything ??

void * twait(int secs)
{
  /// do something here
}

newthread launcher from a dll - follow up.

int timer1(HWND mWnd, int secs, void * func)
{
  pthread_t thread; int err;
  err = pthread_create(&thread, NULL, func, (void *)secs);
  if (err) return 1;
  return 0;
}

timer1(mWnd,0,twait);
working now,
but is 4th parameter done the right way? what about &secs ??
you guys ought to know something.


Post a reply to this message

From: Melody
Subject: Re: HSL HSV colors.inc fopah
Date: 31 Dec 2019 00:40:00
Message: <web.5e0adefeffbdd819da690110@news.povray.org>
extreme use of the term pseudo random,and phi


Post a reply to this message


Attachments:
Download 'colochaos.jpg' (185 KB)

Preview of image 'colochaos.jpg'
colochaos.jpg


 

From: jr
Subject: Re: HSL HSV colors.inc fopah
Date: 31 Dec 2019 05:20:00
Message: <web.5e0b1ff7ffbdd818c662f470@news.povray.org>
hi,

"Melody" <nomail@nomail> wrote:
> "Melody" <nomail@nomail> wrote:
> > libpthreadGC2.a pthreadGC2.dll
> >
> > #include <pthread.h>
> > #include <unistd.h>
>
> C:\mirc614\irc\timer.h|32|warning: control reaches end of non-void function
> [-Wreturn-type]
>
> whats the fix for that warning? for this "non-void function"
> ??? compiler wont allow returning anything ??
>
> void * twait(int secs)
> {
>   /// do something here
> }
>
> newthread launcher from a dll - follow up.
>
> int timer1(HWND mWnd, int secs, void * func)
> {
>   pthread_t thread; int err;
>   err = pthread_create(&thread, NULL, func, (void *)secs);
>   if (err) return 1;
>   return 0;
> }
>
> timer1(mWnd,0,twait);
> working now,
> but is 4th parameter done the right way? what about &secs ??

am fairly sure that should be 'void twait(int);', and I'd keep "do something
here" to just setting some (global) flag.

<https://www.gnu.org/software/libc/manual/html_node/Basic-Signal-Handling.html>
(specific to that library but the same principles apply)

and re 4th argument, you're converting the number of seconds to a pointer
(value), did you mean 'pthread_create(&thread, NULL, func, &secs)'?  no need
(usually) to explicitly cast to '(void *)'.


regards, jr.


Post a reply to this message

From: Bald Eagle
Subject: Re: HSL HSV colors.inc fopah
Date: 31 Dec 2019 16:30:01
Message: <web.5e0bbd17ffbdd814eec112d0@news.povray.org>
The way I'm reading it, based on my work with Arduino, is that your [if] flow
control directive is malformed and so the compiler if waiting to wrap that up
before hitting the end of the function.

void * twait(int secs)
{
  /// do something here
}

newthread launcher from a dll - follow up.

int timer1(HWND mWnd, int secs, void * func)
{
  pthread_t thread; int err;
  err = pthread_create(&thread, NULL, func, (void *)secs);
  if (err) return 1;
  return 0;
}


change the above to:

  if (err) {return 1;
  [else] return 0;
  }

and see what happens.
Of course, I could be totally wrong.

I also think that if at the top of your code you do
int secs = 0;
then you only need to use secs not int secs in the rest of your code.


Post a reply to this message

From: Melody
Subject: Re: HSL HSV colors.inc fopah
Date: 31 Dec 2019 23:30:00
Message: <web.5e0c1f88ffbdd819da690110@news.povray.org>
turns out the only bug I could not really see a way to fix,
but I could patch it ...

thread_create(&thread, NULL, func, (void *)secs);
return 1 to mIRC - dll still loaded....

calls twait(msecs) {
  echos(GlobWnd,msecs);
  // but mirc could only hear previous message

UNLESS
Sleep(50); /// fixes SendMessage issue
echos(GlobWnd,msecs)

then everything OK. patched.


Post a reply to this message

From: Melody
Subject: Re: HSL HSV colors.inc fopah
Date: 8 Jan 2020 18:35:01
Message: <web.5e16667cffbdd819da690110@news.povray.org>
"Melody" <nomail@nomail> wrote:
> "Melody" <nomail@nomail> wrote:
> > libpthreadGC2.a pthreadGC2.dll
> >
> > #include <pthread.h>
> > #include <unistd.h>
>
> C:\mirc614\irc\timer.h|32|warning: control reaches end of non-void function
> [-Wreturn-type]
>
> whats the fix for that warning? for this "non-void function"
> ??? compiler wont allow returning anything ??
>
> void * twait(int secs)
> {
>   /// do something here
> }
>

thought I tried it ... Well, *today this works. compiler stopped whining.
void * twait(int secs)
{
  /// do something here
return (void *)0;
}

Triangle Inequality Average (TIA)
Mercator and figuring log(polar)(slowly) - examples are invisible and
explanations seemingly by those who can't. While those who can, just do it. pQ -
National Defense secret? Wiki was disappointing on the subject.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.