# include "splintMacros.nf"
# include "basic.h"
# include "osd.h"
-# include "portab.h"
/* from stat.h */
/*@ignore@*/
*fullPath == '\0' ||
(*file == CONNECTCHAR || (file[0] != '\0' && file[1] == ':'))
# else
- (*file == CONNECTCHAR)
+ (*file == CONNECTCHAR)
# endif
)
{
/* Path specified. Loop through directories in path looking for the */
/* first occurrence of the file. */
- while (nextdir (&fullPath, &dirPtr, &dirLen) &&
- rVal == OSD_FILENOTFOUND)
+ while (nextdir (&fullPath, &dirPtr, &dirLen)
+ && rVal == OSD_FILENOTFOUND)
{
if ((dirLen + strlen (file) + 2) <= MAXPATHLEN)
{
# endif
}
-# ifdef WIN32
+# if defined (WIN32) || defined (OS2) && defined (__IBMC__)
extern /*@external@*/ int _flushall (void) /*@modifies fileSystem@*/ ;
# endif
{
int res;
/* system ("printenv"); */
-# ifdef WIN32
+# if defined (WIN32) || defined (OS2) && defined (__IBMC__)
(void) _flushall ();
# endif
/*@=redecl@*/
# endif
-static s_tempError = FALSE;
+static bool s_tempError = FALSE;
void osd_setTempError (void)
{
# if defined (WIN32) || defined (OS2) && defined (__IBMC__)
int pid = _getpid ();
# else
- pid_t pid = getpid ();
+ __pid_t pid = getpid ();
# endif
return (int) pid;
cstring osd_outputPath (cstring filename)
{
- /*@i2534 fix this junky code once and for all! */
# if defined (UNIX) || defined (OS2)
char *rel_buffer;
char *rel_buf_p;
}
else
{
- /*@i324 ! splint didn't report an errors for: return ++path_p; */
cstring_free (rel_buffer);
return cstring_fromCharsNew (path_p + 1);
}
{
/* Give up if the result gets to be longer
than the absolute path name. */
- if (rel_buffer + filename_len <= rel_buf_p + 3)
+ char * temp_rel_buf_p;
+
+ /*drl This comment is necessary because for some reason Splint
+ does not realize that the pasts where rel_buf_p is released
+ do not reach here*/
+ /*@-usereleased@*/
+ temp_rel_buf_p = rel_buf_p;
+ /*@-usereleased@*/
+
+ if (rel_buffer + filename_len <= temp_rel_buf_p + 3)
{
sfree (rel_buffer);
return cstring_copy (filename);
while ((*rel_buf_p++ = *path_p++) != '\0') ;
- /*@=usereleased@*/ /*@i523! shouldn't need these */
+ /*@=usereleased@*/ /* Splint limitation: shouldn't need these */
--rel_buf_p;
if (osd_isConnectChar (*(rel_buf_p-1)))