[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]


   NAME
        OpenClipboard -- create a handle on a clipboard unit. (V36)

   SYNOPSIS
        ch = OpenClipboard(unitNumber)
        D0                 D0

        struct clipboardhandle *openclipboard(long);

   FUNCTION
        Opens the clipboard.device and opens a stream for the specified unit
        (usually PRIMARY_CLIP). This handle structure will be used as the
        clipboard stream for IFFHandles initialized as clipboard streams by
        initiffasclip().

   INPUTS
        unitNumber - clipboard unit number (usually PRIMARY_CLIP).

   RESULT
        ch - pointer to clipboardhandle structure or null if unsuccessful.

   BUGS
        This function had several bugs prior to V39.

       First bug was that if the clipboard.device couldn't open, two calls
        to freesignal() were made with uninitialized values as parameters.
        The result of this was a corrupt signal mask in the task field.

        Second bug was that opendevice() was called with an io request that
        didn't have a valid msgport pointer in it.

        Third bug was that the two message ports allocated by the function
        (ClipboardHandle->cbh_CBport and ClipboardHandle->cbh_SatisfyPort)
        were not being initialized correctly and would cause a system crash
        if a message ever got to either of them.

   SEE ALSO
        initiffasclip(), closeclipboard(), <libraries/iffparse.h>