#include "dispextern.h"
#include "nsterm.h"
#include "frame.h"
+#include "coding.h"
-/* call tracing */
-#if 0
-int image_trace_num = 0;
-#define NSTRACE(x) fprintf (stderr, "%s:%d: [%d] " #x "\n", \
- __FILE__, __LINE__, ++image_trace_num)
-#else
-#define NSTRACE(x)
-#endif
/* ==========================================================================
ns_image_from_XBM (unsigned char *bits, int width, int height,
unsigned long fg, unsigned long bg)
{
- NSTRACE (ns_image_from_XBM);
+ NSTRACE ("ns_image_from_XBM");
return [[EmacsImage alloc] initFromXBM: bits
width: width height: height
fg: fg bg: bg];
void *
ns_image_for_XPM (int width, int height, int depth)
{
- NSTRACE (ns_image_for_XPM);
+ NSTRACE ("ns_image_for_XPM");
return [[EmacsImage alloc] initForXPMWithDepth: depth
width: width height: height];
}
void *
ns_image_from_file (Lisp_Object file)
{
- NSTRACE (ns_image_from_bitmap_file);
+ NSTRACE ("ns_image_from_bitmap_file");
return [EmacsImage allocInitFromFile: file];
}
EmacsImage *eImg = nil;
NSSize size;
- NSTRACE (ns_load_image);
+ NSTRACE ("ns_load_image");
if (STRINGP (spec_file))
{
if (eImg == nil)
{
- add_to_log ("Unable to load image %s", img->spec, Qnil);
+ add_to_log ("Unable to load image %s", img->spec);
return 0;
}
found = x_find_image_file (file);
if (!STRINGP (found))
return nil;
+ found = ENCODE_FILE (found);
image = [[EmacsImage alloc] initByReferencingFile:
[NSString stringWithUTF8String: SSDATA (found)]];