X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=os2%2Fos2.c;h=830d90016369eada8a290a39d0224e447d2a9bf1;hb=7d824d8e6f7cacfafe95d58fa9ab3d99bd41e854;hp=655e613a92ca972a692f00b23efd3c3c2cc4215b;hpb=c798bd2165d7b5d59c62ab6330f7cf77ff8b09dd;p=p5sagit%2Fp5-mst-13.2.git diff --git a/os2/os2.c b/os2/os2.c index 655e613..830d900 100644 --- a/os2/os2.c +++ b/os2/os2.c @@ -2744,21 +2744,21 @@ my_flock(int handle, int o) if (!(_emx_env & 0x200) || !use_my) return flock(handle, o); /* Delegate to EMX. */ - // is this a file? + /* is this a file? */ if ((DosQueryHType(handle, &handle_type, &flag_word) != 0) || (handle_type & 0xFF)) { errno = EBADF; return -1; } - // set lock/unlock ranges + /* set lock/unlock ranges */ rNull.lOffset = rNull.lRange = rFull.lOffset = 0; rFull.lRange = 0x7FFFFFFF; - // set timeout for blocking + /* set timeout for blocking */ timeout = ((blocking = !(o & LOCK_NB))) ? 100 : 1; - // shared or exclusive? + /* shared or exclusive? */ shared = (o & LOCK_SH) ? 1 : 0; - // do not block the unlock + /* do not block the unlock */ if (o & (LOCK_UN | LOCK_SH | LOCK_EX)) { rc = DosSetFileLocks(handle, &rFull, &rNull, timeout, shared); switch (rc) { @@ -2772,7 +2772,7 @@ my_flock(int handle, int o) errno = ENOLCK; return -1; case ERROR_LOCK_VIOLATION: - break; // not an error + break; /* not an error */ case ERROR_INVALID_PARAMETER: case ERROR_ATOMIC_LOCK_NOT_SUPPORTED: case ERROR_READ_LOCKS_NOT_SUPPORTED: @@ -2786,9 +2786,9 @@ my_flock(int handle, int o) return -1; } } - // lock may block + /* lock may block */ if (o & (LOCK_SH | LOCK_EX)) { - // for blocking operations + /* for blocking operations */ for (;;) { rc = DosSetFileLocks( @@ -2826,7 +2826,7 @@ my_flock(int handle, int o) errno = EINVAL; return -1; } - // give away timeslice + /* give away timeslice */ DosSleep(1); } } @@ -2880,7 +2880,7 @@ my_getpwent (void) if (!use_my_pwent()) return getpwent(); /* Delegate to EMX. */ if (pwent_cnt++) - return 0; // Return one entry only + return 0; /* Return one entry only */ return getpwuid(0); } @@ -2901,7 +2901,7 @@ struct group * getgrent (void) { if (grent_cnt++) - return 0; // Return one entry only + return 0; /* Return one entry only */ return getgrgid(0); }