Skip to content

Commit

Permalink
Fix editing slips, add stub sqPasteboardPutItemFlavordatalengthformat…
Browse files Browse the repository at this point in the history
…Type()

Unix ClipboardExtendedPlugin now loads and runs.
  • Loading branch information
David T. Lewis authored and eliotmiranda committed Mar 26, 2023
1 parent 4382815 commit 37a221c
Showing 1 changed file with 11 additions and 5 deletions.
Expand Up @@ -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;
Expand All @@ -128,14 +128,20 @@ sqPasteboardCopyItemFlavorsitemNumber(sqInt inPasteboard, int formatNumber)
sqInt
sqCreateClipboard(void) { return 1; }


void
sqPasteboardPutItemFlavordatalengthformatTypeformatLength(sqInt inPasteboard, char * data, int ndata, char * typeName, int ntypeName)
{
clipboardWriteWithType(data, ndata, typeName, ntypeName, 0, 1);
}


void
sqPasteboardPutItemFlavordatalengthformatType(sqInt inPasteboard, char *inData, sqInt dataLength, sqInt format)
{
interpreterProxy->primitiveFailFor(PrimErrUnsupported);
}


/* Read the clipboard */
int
sqPasteboardCopyItemFlavorDataformatformatLength(sqInt inPasteboard, char* format, int formatLength)
Expand All @@ -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 */
}
Expand All @@ -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();
Expand Down

0 comments on commit 37a221c

Please sign in to comment.