Re: [ros-dev] [ros-diffs] [hbelusca] 63599: [TASKMGR]: Use the EndTask API to kill tasks.

2014-06-16 Thread Pierre Schweitzer
On 15/06/2014 19:47, hbelu...@svn.reactos.org wrote:
 +/* Trick: on Windows, pressing the CTRL key forces the task to be ended 
 */
 +BOOL ForceEndTask = !!(GetKeyState(VK_CONTROL)  0x8000);
 +

Was it really meant to be '!!'?

-- 
Pierre Schweitzerpierre at reactos.org
System Administrator
ReactOS Foundation




smime.p7s
Description: S/MIME Cryptographic Signature
___
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev

Re: [ros-dev] [ros-diffs] [hbelusca] 63599: [TASKMGR]: Use the EndTask API to kill tasks.

2014-06-16 Thread Ged Murphy
Yes, the double negate is a little trick to give you either a 1 or a 0 instead 
of the value of the operation.


-Original Message-
From: Ros-dev [mailto:ros-dev-boun...@reactos.org] On Behalf Of Pierre 
Schweitzer
Sent: 16 June 2014 07:31
To: ros-dev@reactos.org
Subject: Re: [ros-dev] [ros-diffs] [hbelusca] 63599: [TASKMGR]: Use the EndTask 
API to kill tasks.

On 15/06/2014 19:47, hbelu...@svn.reactos.org wrote:
 +/* Trick: on Windows, pressing the CTRL key forces the task to be ended 
 */
 +BOOL ForceEndTask = !!(GetKeyState(VK_CONTROL)  0x8000);
 +

Was it really meant to be '!!'?

--
Pierre Schweitzerpierre at reactos.org System Administrator ReactOS Foundation




___
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev


Re: [ros-dev] [ros-diffs] [hbelusca] 63599: [TASKMGR]: Use the EndTask API to kill tasks.

2014-06-16 Thread David Quintana (gigaherz)
It's equivalent to writing something != 0, although less readable. I
have no idea if compilers actually generate better code for it, or people
just do it because it's shorter to type.


On 16 June 2014 11:09, Ged Murphy gedmurphy.mailli...@gmail.com wrote:

 Yes, the double negate is a little trick to give you either a 1 or a 0
 instead of the value of the operation.


 -Original Message-
 From: Ros-dev [mailto:ros-dev-boun...@reactos.org] On Behalf Of Pierre
 Schweitzer
 Sent: 16 June 2014 07:31
 To: ros-dev@reactos.org
 Subject: Re: [ros-dev] [ros-diffs] [hbelusca] 63599: [TASKMGR]: Use the
 EndTask API to kill tasks.

 On 15/06/2014 19:47, hbelu...@svn.reactos.org wrote:
  +/* Trick: on Windows, pressing the CTRL key forces the task to be
 ended */
  +BOOL ForceEndTask = !!(GetKeyState(VK_CONTROL)  0x8000);
  +

 Was it really meant to be '!!'?

 --
 Pierre Schweitzerpierre at reactos.org System Administrator ReactOS
 Foundation




 ___
 Ros-dev mailing list
 Ros-dev@reactos.org
 http://www.reactos.org/mailman/listinfo/ros-dev

___
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev

Re: [ros-dev] [ros-diffs] [hbelusca] 63599: [TASKMGR]: Use the EndTask API to kill tasks.

2014-06-16 Thread Ged Murphy
They produce the same asm.

 

From: Ros-dev [mailto:ros-dev-boun...@reactos.org] On Behalf Of David Quintana 
(gigaherz)
Sent: 16 June 2014 11:10
To: ReactOS Development List
Subject: Re: [ros-dev] [ros-diffs] [hbelusca] 63599: [TASKMGR]: Use the EndTask 
API to kill tasks.

 

It's equivalent to writing something != 0, although less readable. I have 
no idea if compilers actually generate better code for it, or people just do it 
because it's shorter to type.

 

On 16 June 2014 11:09, Ged Murphy gedmurphy.mailli...@gmail.com 
mailto:gedmurphy.mailli...@gmail.com  wrote:

Yes, the double negate is a little trick to give you either a 1 or a 0 instead 
of the value of the operation.



-Original Message-
From: Ros-dev [mailto:ros-dev-boun...@reactos.org 
mailto:ros-dev-boun...@reactos.org ] On Behalf Of Pierre Schweitzer
Sent: 16 June 2014 07:31
To: ros-dev@reactos.org mailto:ros-dev@reactos.org 
Subject: Re: [ros-dev] [ros-diffs] [hbelusca] 63599: [TASKMGR]: Use the EndTask 
API to kill tasks.

On 15/06/2014 19:47, hbelu...@svn.reactos.org mailto:hbelu...@svn.reactos.org 
 wrote:
 +/* Trick: on Windows, pressing the CTRL key forces the task to be ended 
 */
 +BOOL ForceEndTask = !!(GetKeyState(VK_CONTROL)  0x8000);
 +

Was it really meant to be '!!'?

--
Pierre Schweitzerpierre at reactos.org http://reactos.org  System 
Administrator ReactOS Foundation





___
Ros-dev mailing list
Ros-dev@reactos.org mailto:Ros-dev@reactos.org 
http://www.reactos.org/mailman/listinfo/ros-dev

 

___
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev

Re: [ros-dev] [ros-diffs] [hbelusca] 63599: [TASKMGR]: Use the EndTask API to kill tasks.

2014-06-16 Thread Hermès BÉLUSCA - MAÏTO
+1 @ Ged, yes I prefer having a 1 or 0 instead of something else (in case 
somebody after makes a “ForceEndTask == TRUE” comparison instead of just 
checking for non-zero value of ForceEndTask).

 

H.

 

De : Ros-dev [mailto:ros-dev-boun...@reactos.org] De la part de Ged Murphy
Envoyé : lundi 16 juin 2014 12:48
À : 'ReactOS Development List'
Objet : Re: [ros-dev] [ros-diffs] [hbelusca] 63599: [TASKMGR]: Use the EndTask 
API to kill tasks.

 

They produce the same asm.

 

From: Ros-dev [mailto:ros-dev-boun...@reactos.org] On Behalf Of David Quintana 
(gigaherz)
Sent: 16 June 2014 11:10
To: ReactOS Development List
Subject: Re: [ros-dev] [ros-diffs] [hbelusca] 63599: [TASKMGR]: Use the EndTask 
API to kill tasks.

 

It's equivalent to writing something != 0, although less readable. I have 
no idea if compilers actually generate better code for it, or people just do it 
because it's shorter to type.

 

On 16 June 2014 11:09, Ged Murphy gedmurphy.mailli...@gmail.com wrote:

Yes, the double negate is a little trick to give you either a 1 or a 0 instead 
of the value of the operation.



-Original Message-
From: Ros-dev [mailto:ros-dev-boun...@reactos.org] On Behalf Of Pierre 
Schweitzer
Sent: 16 June 2014 07:31
To: ros-dev@reactos.org
Subject: Re: [ros-dev] [ros-diffs] [hbelusca] 63599: [TASKMGR]: Use the EndTask 
API to kill tasks.

On 15/06/2014 19:47, hbelu...@svn.reactos.org wrote:
 +/* Trick: on Windows, pressing the CTRL key forces the task to be ended 
 */
 +BOOL ForceEndTask = !!(GetKeyState(VK_CONTROL)  0x8000);
 +

Was it really meant to be '!!'?

--
Pierre Schweitzerpierre at reactos.org System Administrator ReactOS Foundation




___
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev

 

___
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev