[MLton-commit] r4658

Stephen Weeks MLton@mlton.org
Thu, 22 Jun 2006 15:38:00 -0700


Converted ints to bools (zero or one) by comparison against zero in
places where posix functions aren't guaranteed to return bools.


----------------------------------------------------------------------

U   mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/FileSys/ST.c
U   mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/ProcEnv/isatty.c
U   mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifExited.c
U   mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifSignaled.c
U   mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifStopped.c

----------------------------------------------------------------------

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/FileSys/ST.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/FileSys/ST.c	2006-06-18 23:49:04 UTC (rev 4657)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/FileSys/ST.c	2006-06-22 22:37:58 UTC (rev 4658)
@@ -1,29 +1,29 @@
 #include "platform.h"
 
-Bool_t Posix_FileSys_ST_isBlk (C_Mode_t m) {
-  return S_ISBLK(m);
+Bool Posix_FileSys_ST_isBlk (C_Mode_t m) {
+  return 0 != S_ISBLK(m);
 }
 
-Bool_t Posix_FileSys_ST_isChr (C_Mode_t m) {
-  return S_ISCHR(m);
+Bool Posix_FileSys_ST_isChr (C_Mode_t m) {
+  return 0 != S_ISCHR(m);
 }
 
-Bool_t Posix_FileSys_ST_isDir (C_Mode_t m) {
-  return S_ISDIR(m);
+Bool Posix_FileSys_ST_isDir (C_Mode_t m) {
+  return 0 != S_ISDIR(m);
 }
 
-Bool_t Posix_FileSys_ST_isFIFO (C_Mode_t m) {
-  return S_ISFIFO(m);
+Bool Posix_FileSys_ST_isFIFO (C_Mode_t m) {
+  return 0 != S_ISFIFO(m);
 }
 
-Bool_t Posix_FileSys_ST_isLink (C_Mode_t m) {
-  return S_ISLNK(m);
+Bool Posix_FileSys_ST_isLink (C_Mode_t m) {
+  return 0 != S_ISLNK(m);
 }
 
-Bool_t Posix_FileSys_ST_isReg (C_Mode_t m) {
-  return S_ISREG(m);
+Bool Posix_FileSys_ST_isReg (C_Mode_t m) {
+  return 0 != S_ISREG(m);
 }
 
-Bool_t Posix_FileSys_ST_isSock (C_Mode_t m) {
-  return S_ISSOCK(m);
+Bool Posix_FileSys_ST_isSock (C_Mode_t m) {
+  return 0 != S_ISSOCK(m);
 }

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/ProcEnv/isatty.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/ProcEnv/isatty.c	2006-06-18 23:49:04 UTC (rev 4657)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/ProcEnv/isatty.c	2006-06-22 22:37:58 UTC (rev 4658)
@@ -1,5 +1,5 @@
 #include "platform.h"
 
-Bool_t Posix_ProcEnv_isatty (C_Fd_t f) {
-  return isatty (f);
+Bool Posix_ProcEnv_isatty (C_Fd_t f) {
+  return 0 != isatty (f);
 }

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifExited.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifExited.c	2006-06-18 23:49:04 UTC (rev 4657)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifExited.c	2006-06-22 22:37:58 UTC (rev 4658)
@@ -4,5 +4,5 @@
   int i;
   
   i = s;
-  return WIFEXITED (i);
+  return 0 != WIFEXITED (i);
 }

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifSignaled.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifSignaled.c	2006-06-18 23:49:04 UTC (rev 4657)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifSignaled.c	2006-06-22 22:37:58 UTC (rev 4658)
@@ -4,5 +4,5 @@
   int i;
   
   i = s;
-  return WIFSIGNALED (i);
+  return 0 != WIFSIGNALED (i);
 }

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifStopped.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifStopped.c	2006-06-18 23:49:04 UTC (rev 4657)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifStopped.c	2006-06-22 22:37:58 UTC (rev 4658)
@@ -4,5 +4,5 @@
   int i;
   
   i = s;
-  return WIFSTOPPED (i);
+  return 0 != WIFSTOPPED (i);
 }