#include "lisp.h"
#include "process.h"
-#undef init_process
+#ifdef MAC_OSX
+#undef select
+#endif
#include "systime.h"
#include "sysselect.h"
#include "blockinput.h"
/* The single script context used for all script executions. */
static OSAID as_script_context;
+#ifndef MAC_OSX
static OSErr posix_pathname_to_fsspec P_ ((const char *, FSSpec *));
static OSErr fsspec_to_posix_pathname P_ ((const FSSpec *, char *, int));
+#endif
/* When converting from Mac to Unix pathnames, /'s in folder names are
converted to :'s. This function, used in copying folder names,
&& '0' <= P[1] && P[1] <= '7'
&& '0' <= P[2] && P[2] <= '7')
{
- *q++ = (P[0] - '0' << 6) + (P[1] - '0' << 3) + (P[2] - '0');
+ *q++ = ((P[0] - '0') << 6) + ((P[1] - '0') << 3) + (P[2] - '0');
P += 3;
}
else
/* Determine the path name of the file specified by VREFNUM, DIRID,
and NAME and place that in the buffer PATH of length
MAXPATHLEN. */
-int
+static int
path_from_vol_dir_name (char *path, int man_path_len, short vol_ref_num,
long dir_id, ConstStr255Param name)
{
}
+#ifndef MAC_OSX
+
static OSErr
posix_pathname_to_fsspec (ufn, fs)
const char *ufn;
return fnfErr;
}
-#ifndef MAC_OSX
-
int
readlink (const char *path, char *buf, int bufsiz)
{
short vol_ref_num;
long dir_id;
OSErr err;
- Str255 dir_name, full_path;
- CInfoPBRec cpb;
+ Str255 full_path;
char unix_dir_name[MAXPATHLEN+1];
DIR *dir;
short vol_ref_num;
long dir_id;
OSErr err;
- Str255 dir_name, full_path;
- CInfoPBRec cpb;
+ Str255 full_path;
static char system_folder_unix_name[MAXPATHLEN+1];
DIR *dir;
#else
FSSpec fss;
#endif
- OSType cCode;
Lisp_Object result = Qnil;
CHECK_STRING (filename);
#else
FSSpec fss;
#endif
- OSType cCode;
Lisp_Object result = Qnil;
CHECK_STRING (filename);
Lisp_Object result = Qnil;
DescType src_desc_type, dst_desc_type;
AEDesc dst_desc;
-#ifdef MAC_OSX
- FSRef fref;
-#else
- FSSpec fs;
-#endif
CHECK_STRING (src_data);
if (EQ (src_type, Qundecoded_file_name))
}
if (NILP (key))
- if (EQ (format, Qxml))
- {
- CFDataRef data = CFPropertyListCreateXMLData (NULL, plist);
- if (data == NULL)
- goto out;
- result = cfdata_to_lisp (data);
- CFRelease (data);
- }
- else
- result =
- cfproperty_list_to_lisp (plist, EQ (format, Qt),
- NILP (hash_bound) ? -1 : XINT (hash_bound));
+ {
+ if (EQ (format, Qxml))
+ {
+ CFDataRef data = CFPropertyListCreateXMLData (NULL, plist);
+ if (data == NULL)
+ goto out;
+ result = cfdata_to_lisp (data);
+ CFRelease (data);
+ }
+ else
+ result =
+ cfproperty_list_to_lisp (plist, EQ (format, Qt),
+ NILP (hash_bound) ? -1 : XINT (hash_bound));
+ }
out:
if (app_plist)
#ifdef MAC_OSX
-#undef select
extern int inhibit_window_system;
extern int noninteractive;