Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-Filescrp_write()Scrap Libraryscrp_read() AESSyntaxWORD scrp_read( cpath )
char *cpath;
Function scrp_read() returns the location of the current clipboard
directory.
Opcode 80 (0x50)
Availability All AESversions.
Parameters cpath is a pointer to a character buffer of at least 128
bytes into which the clipboard path will be placed.
Binding addrin[0] = cpath;
return crys_if(0x50);
Return Value scrp_read() returns 0 if the clipboard path had not been
set or non-zero if cpath was properly updated.
Caveats The system scrap directory is a global resource. Some
programs incorrectly call scrp_write() with a path and
filename when only a pathname should be used. The following
is an example of a correctly formatted cpath argument:
C:\CLIPBRD\
Unfortunately, not all programs adhere exactly to
this standard. For this reason, programs reading this
information from scrp_read() should be especially careful
that the information returned is parsed correctly. In
addition, don't count on a trailing backslash or the
existence of a drive specification.
Comments If a value of 0 is returned and the application wishes to
write a scrap to the clipboard you should follow these
steps: Create a folder '\CLIPBRD\' on the root directory of
the user's boot drive ('C:' or 'A:').
Write your scrap to the directory as 'SCRAP.???' where
'???' signifies the type of information contained in the
file.
Allow other applications to access this information by
calling scrp_write() with the new clipboard path. For
example "C:\CLIPBRD\". A detailed discussion of the proper
clipboard data exchange protocol, including information
about a scrap directory semaphore useful with MultiTOS, is
given earlier in this chapter.
See Also scrp_write()Group Scrap Library