Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Tracker SCM

SCM Repository

[smlnj] Diff of /sml/trunk/src/eXene/lib/protocol/xreply.sml
ViewVC logotype

Diff of /sml/trunk/src/eXene/lib/protocol/xreply.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1349, Wed Sep 3 22:22:18 2003 UTC revision 1350, Fri Sep 5 21:34:27 2003 UTC
# Line 53  Line 53 
53        fun getWord (s, i) = Word.fromLargeWord(get32(s, i))        fun getWord (s, i) = Word.fromLargeWord(get32(s, i))
54        fun getInt (s, i) = LargeWord.toIntX(Pack32Big.subVecX(s, i div 4))        fun getInt (s, i) = LargeWord.toIntX(Pack32Big.subVecX(s, i div 4))
55    
56          val w8vextract = Word8VectorSlice.vector o Word8VectorSlice.slice
57    
58  fun wrapFn name f (s, i) = (f(s, i) handle ex => (  fun wrapFn name f (s, i) = (f(s, i) handle ex => (
59  XDebug.errTrace(fn () => ["**** ", name, "(", Int.toString(W8V.length s), ",",  XDebug.errTrace(fn () => ["**** ", name, "(", Int.toString(W8V.length s), ",",
60  Int.toString i, ")\n"]); raise ex))  Int.toString i, ")\n"]); raise ex))
# Line 525  Line 527 
527                typ = getXAtom(buf, 8),                typ = getXAtom(buf, 8),
528                value = XTy.RAW_DATA {                value = XTy.RAW_DATA {
529                    format = getRawFormat(buf, 1),                    format = getRawFormat(buf, 1),
530                    data = W8V.extract(buf, 12, SOME 20)                    data = w8vextract(buf, 12, SOME 20)
531                  }                  }
532              }              }
533        fun decodeMappingNotify buf = (case W8V.sub(buf, 4)        fun decodeMappingNotify buf = (case W8V.sub(buf, 4)
# Line 673  Line 675 
675      fun decodeGetImageReply msg = {      fun decodeGetImageReply msg = {
676              depth = getInt8(msg, 1),              depth = getInt8(msg, 1),
677              visualid = getVisualIdOption(msg, 8),              visualid = getVisualIdOption(msg, 8),
678              data = W8V.extract(msg, 32, SOME(4*getInt(msg, 4)))              data = w8vextract(msg, 32, SOME(4*getInt(msg, 4)))
679            }            }
680    
681      fun decodeGetInputFocusReply msg = {      fun decodeGetInputFocusReply msg = {
# Line 696  Line 698 
698              bell_pct = getInt8(msg, 13),              bell_pct = getInt8(msg, 13),
699              bell_pitch = getInt16(msg, 14),              bell_pitch = getInt16(msg, 14),
700              bell_duration = getInt16(msg, 16),              bell_duration = getInt16(msg, 16),
701              auto_repeats = W8V.extract(msg, 20, SOME 32)              auto_repeats = w8vextract(msg, 20, SOME 32)
702            }            }
703    
704      fun decodeGetKeyboardMappingReply msg = let      fun decodeGetKeyboardMappingReply msg = let
# Line 770  Line 772 
772                        bytes_after = getInt(msg, 12),                        bytes_after = getInt(msg, 12),
773                        value = XTy.RAW_DATA {                        value = XTy.RAW_DATA {
774                            format = fmt,                            format = fmt,
775                            data = W8V.extract(msg, 32, SOME nbytes)                            data = w8vextract(msg, 32, SOME nbytes)
776                          }                          }
777                      }                      }
778                  end)                  end)

Legend:
Removed from v.1349  
changed lines
  Added in v.1350

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0