[TWAIN] (revised) Reconcile sane's long names to TWAIN's 32 byte limit

Jeremy White jwhite at codeweavers.com
Mon Feb 13 13:49:21 CST 2006

(This version revised to eliminate casts as pointed out by Rob, and also to
eliminate the use of HeapAlloc as requested by Alexandre).

libsane can return arbitrarily long names, but TWAIN supports only a maximum of 32.
Further, the name is a unique identifier, and so must be returned to libsane for processing.

This algorithm tries to convert a long libsane name into a more reasonable short name,
but adds a crude signature process in an attempt to ensure a unique short identifier.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t2.diff
Type: text/x-patch
Size: 6309 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060213/ac5ae898/t2.diff

More information about the wine-patches mailing list