diff --git a/platforms/unix/plugins/ClipboardExtendedPlugin/sqUnixExtendedClipboard.c b/platforms/unix/plugins/ClipboardExtendedPlugin/sqUnixExtendedClipboard.c index a18dc3b6b6..3084186822 100755 --- a/platforms/unix/plugins/ClipboardExtendedPlugin/sqUnixExtendedClipboard.c +++ b/platforms/unix/plugins/ClipboardExtendedPlugin/sqUnixExtendedClipboard.c @@ -104,8 +104,8 @@ sqPasteboardCopyItemFlavorsitemNumber(sqInt inPasteboard, int formatNumber) return outData; int i; - sqInt outData = 0; - char **types = clipboardGetTypeNames(); + outData = 0; + types = clipboardGetTypeNames(); if (!types) return 0; @@ -128,7 +128,6 @@ sqPasteboardCopyItemFlavorsitemNumber(sqInt inPasteboard, int formatNumber) sqInt sqCreateClipboard(void) { return 1; } - void sqPasteboardPutItemFlavordatalengthformatTypeformatLength(sqInt inPasteboard, char * data, int ndata, char * typeName, int ntypeName) { @@ -136,6 +135,13 @@ sqPasteboardPutItemFlavordatalengthformatTypeformatLength(sqInt inPasteboard, ch } +void +sqPasteboardPutItemFlavordatalengthformatType(sqInt inPasteboard, char *inData, sqInt dataLength, sqInt format) +{ + interpreterProxy->primitiveFailFor(PrimErrUnsupported); +} + + /* Read the clipboard */ int sqPasteboardCopyItemFlavorDataformatformatLength(sqInt inPasteboard, char* format, int formatLength) @@ -162,7 +168,7 @@ sqPasteboardhasDataInFormatformatLength(sqInt inPasteboard, char *format, sqInt return 0; for (i = 0; types[i]; i++) { if (strlen(types[i]) == formatLength - && !strcmp(types[i],format,formatLength)) + && !strncmp(types[i],format,formatLength)) found = 1; free(types[i]); /* XFree() is better */ } @@ -171,7 +177,7 @@ sqPasteboardhasDataInFormatformatLength(sqInt inPasteboard, char *format, sqInt } sqInt -sqPasteboardhasDataInFormat(sqInt, sqInt format) +sqPasteboardhasDataInFormat(sqInt inPasteboard, sqInt format) { interpreterProxy->primitiveFailFor(PrimErrUnsupported); return interpreterProxy->nilObject();