`
`7/5/11 2:57 PM
`
`ShastraidTagOut(fd, (shastraidTag *) bunch->things[0]);
`ShastraintOut(fd, &pShminfo->shmid);
`cmFlush(fd);
`return;
`
`}
`I* USESHAREDMEMFORPICT *I
`#endif
`putStringOnChannel(fd, REQ_SEND_MSGPICT, "putCollSendMsgPictHandler()")
`
`ShastraidTagOut(fd, (shastraidTag *) bunch->things[0] );
`PictDataBitesOut(fd, pPCBites);
`cmFlush(fd);
`
`}
`
`* Function
`*I
`int
`putCollRecvdMsgPictHandler(fd, buf)
`int
`fd;
`char
`*buf;
`
`{
`
`}
`
`putStringOnChannel(fd, REQ_RECVD_MSGPICT, "putCollRecvdMsgPictHandler(
`
`) II )
`
`;
`
`putStringOnChannel(fd, buf, "putCollRecvdMsgPictHandler()");
`cmFlush(fd);
`
`I*
`* Function
`*I
`
`int
`putCollStartXSCntlHandler(fd, pSidTag)
`int
`fd;
`shastraidTag
`*PSidTag;
`
`{
`
`putStringOnChannel(fd, REQ_START_XSCNTL, "putCollStartXSCntlHandler()")
`
`ShastraidTagOut(fd, pSidTag);
`cmFlush(fd);
`
`}
`
`* Function
`*I
`int
`putCollEndXSCntlHandler(fd, pSidTag)
`int
`fd;
`shastraidTag
`*PSidTag;
`
`{
`
`putStringOnChannel(fd, REQ_END_XSCNTL, "putCollEndXSCntlHandler()");
`ShastraidTagOut(fd, pSidTag);
`cmFlush(fd);
`
`Page 69 of 83
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2001
`
`
`
`sesMgr_server.c
`
`7/5/11 2:57 PM
`
`* Function
`*I
`int
`putCollSendXSCntlHandler(fd 1 buf)
`int
`fd;
`char
`*buf;
`
`{
`
`bunchOfThings *bunch;
`bunch = (bunchOfThings *) buf;
`11 putCollSendXSCntlHandler() 11
`putStringOnChannel(fd 1 REQ_SEND_XSCNTL 1
`(shastraidTag *) bunch->things[0] );
`ShastraidTagOut(fd 1
`putSt ringOnChanne l ( fd 1 bunch->thing s [ 1] 1
`II put Co llSendXSCnt lHand le r ()II);
`cmFlush(fd);
`
`) ;
`
`}
`
`* Function
`*I
`int
`putCollSendMsgXSCntlHandler(fd 1 buf)
`int
`fd;
`char
`*buf;
`
`{
`
`bunchOfThings *bunch;
`xsCntlDatas
`*PXSCBites;
`int
`n;
`shminfo
`*PShminfo;
`bunch = (bunchOfThings *) buf;
`pXSCBites = (xsCntlDatas *) bunch->things[1];
`#ifdef USESHAREDMEMFORXSCD
`if (kernelShastraid.liPAddr == localShaidin[fd] .liPAddr) {
`pShminfo = pSesMgrCollData->pShminfoOut;
`if ( !pShminfo->shmDirty) {
`pShminfo->shmDirty = 1;
`n = 0;
`((n > 10240) 7 n : 10240)) == 0
`if (shMemReuseSegment(pShminfo 1
`) {
`11 putCollSendMsgXSCntlHandler()->couldn't
`fprintf(stderr 1
`shMemReuseSegment!\n 11
`
`) ;
`
`}
`xsCntlDatasMemOut(pShminfo->shmAddr 1 pShminfo->shmSize 1
`pXSCBi tes);
`
`}
`putStringOnChannel(fd 1 REQ_SEND_MSGSHMXSCNTL 1
`11 putCollSendMsgXSCntlHandler() 11
`(shastraidTag *) bunch->things[0]);
`ShastraidTagOut(fd 1
`ShastraintOut(fd 1 &pShminfo->shmid);
`cmFlush(fd);
`return;
`
`) ;
`
`}
`I* USESHAREDMEMFORXSCD *I
`#endif
`putStringOnChannel(fd 1 REQ_SEND_MSGXSCNTL 1
`
`11 putCollSendMsgXSCntlHandler
`
`Page 70 of 83
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2002
`
`
`
`sesMgr_server.c
`
`7/5/11 2:57 PM
`
`()II);
`(shastraidTag *) bunch->things[0] );
`ShastraidTagOut(fd 1
`XSCntlBitesOut(fd 1 pXSCBites);
`cmFlush(fd);
`
`}
`
`* Function
`*I
`int
`putCollRecvdMsgXSCntlHandler(fd 1 buf)
`int
`fd;
`char
`*buf;
`
`{
`
`}
`
`putStringOnChannel(fd 1 REQ_RECVD_MSGXSCNTL 1
`11 putCollRecvdMsgXSCntlHandler() 11
`II put Co llRecvdMsgXSCnt lHand le r ( ) II) ;
`putSt r ingOnChanne l ( fd 1 buf 1
`cmFlush(fd);
`
`) ;
`
`I*
`* Function
`*I
`
`int
`putCollStartPntrHandler(fd 1 pSidTag)
`int
`fd;
`shastraidTag
`*PSidTag;
`
`{
`
`}
`
`putStringOnChannel(fd 1 REQ_START_PNTR 1
`ShastraidTagOut(fd 1 pSidTag);
`cmFlush(fd);
`
`11 putCollStartPntrHandler() 11
`
`) ;
`
`* Function
`*I
`int
`putCollEndPntrHandler(fd 1 pSidTag)
`int
`fd;
`shastraidTag
`*PSidTag;
`
`{
`
`}
`
`putStringOnChannel(fd 1 REQ_END_PNTR 1
`ShastraidTagOut(fd 1 pSidTag);
`cmFlush(fd);
`
`11 putCollEndPntrHandler() 11
`
`) ;
`
`* Function
`*I
`int
`putCollSendPntrHandler(fd 1 buf)
`int
`fd;
`char
`*buf;
`
`{
`
`bunchOfThings *bunch;
`
`Page 71 of 83
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2003
`
`
`
`sesMgr _server. c
`
`7/5/11 2:57 PM
`
`bunch = (bunchOfThings *) buf;
`11 putCollSendPntrHandler() 11
`putStringOnChannel(fd 1 REQ_SEND_PNTR 1
`(shastraidTag *) bunch->things[0] );
`ShastraidTagOut(fd 1
`putSt ringOnChanne l ( fd 1 bunch->thing s [ 1] 1
`II put Co llSend Pnt rHand le r ()II);
`cmFlush(fd);
`
`) ;
`
`}
`
`* Function
`*I
`int
`putCollSendMsgPntrHandler(fd 1 buf)
`int
`fd;
`char
`*buf;
`
`{
`
`bunchOfThings *bunch;
`shaDoubles
`*PPntrD;
`int
`n;
`shminfo
`*PShminfo;
`bunch = (bunchOfThings *) buf;
`pPntrD = (shaDoubles *) bunch->things[1];
`#ifdef USESHAREDMEMFORPNTR
`if (kernelShastraid.liPAddr == localShaidin[fd] .liPAddr) {
`pShminfo = pSesMgrCollData->pShminfoOut;
`if ( !pShminfo->shmDirty) {
`pShminfo->shmDirty = 1;
`n = strlen(msg) + 1;
`if ( shMemReuseSegment ( pShminfo 1
`) {
`11 putCollSendMsgPntrHandler()->couldn't
`fprintf(stderr 1
`shMemReuseSegment!\n 11
`
`( n > 10240) 7 n : 10240))
`
`(
`
`0
`
`) ;
`
`}
`memcpy(pShminfo->shmAddr 1 msg 1 n);
`
`}
`putStringOnChannel(fd 1 REQ_SEND_MSGSHMPNTR 1
`11 putCollSendMsgPntrHandler() 11
`(shastraidTag *) bunch->things[0]);
`ShastraidTagOut(fd 1
`ShastraintOut(fd 1 &pShminfo->shmid);
`cmFlush(fd);
`return;
`
`) ;
`
`}
`#end if
`
`I* USESHAREDMEMFORPNTR *I
`
`putStringOnChannel(fd 1 REQ_SEND_MSGPNTR 1
`
`11 putCollSendMsgPntrHandler() 11
`
`)
`
`(shastraidTag *) bunch->things[0] );
`ShastraidTagOut(fd 1
`PntrBiteOut(fd 1 pPntrD);
`cmFlush(fd);
`
`}
`
`* Function
`*I
`int
`
`Page 72 of 83
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2004
`
`
`
`sesMgr _server. c
`
`7/5/11 2:57 PM
`
`putCollRecvdMsgPntrHandler(fd 1 buf)
`int
`fd;
`char
`*buf;
`
`{
`
`}
`
`putStringOnChannel(fd 1 REQ_RECVD_MSGPNTR 1
`) II ) ;
`putStringOnChannel(fd 1 buf 1
`cmFlush(fd);
`
`11 putCollRecvdMsgPntrHandler() 11
`
`) ;
`
`11 putCollRecvdMsgPntrHandler(
`
`I*
`* Function
`*I
`
`int
`putCollStartCursorHandler(fd 1 pSidTag)
`int
`fd;
`shastraidTag
`*PSidTag;
`
`{
`
`putStringOnChannel(fd 1 REQ_START_CURSOR 1
`
`11 putCollStartCursorHandler() 11
`
`)
`
`ShastraidTagOut(fd 1 pSidTag);
`cmFlush(fd);
`
`}
`
`* Function
`*I
`int
`putCollEndCursorHandler(fd 1 pSidTag)
`int
`fd;
`shastraidTag
`*PSidTag;
`
`{
`
`}
`
`putStringOnChannel(fd 1 REQ_END_CURSOR 1
`ShastraidTagOut(fd 1 pSidTag);
`cmFlush(fd);
`
`11 putCollEndCursorHandler() 11
`
`) ;
`
`* Function
`*I
`int
`putCollSendCursorHandler(fd 1 buf)
`int
`fd;
`char
`*buf;
`
`{
`
`bunchOfThings *bunch;
`bunch = (bunchOfThings *) buf;
`11 putCollSendCursorHandler() 11
`putStringOnChannel(fd 1 REQ_SEND_CURSOR 1
`(shastraidTag *) bunch->things[0] );
`ShastraidTagOut(fd 1
`putSt r ingOnChanne l( fd 1 bunch->thing s [ 1] 1
`II put Co llSendCu rso rHand le r ()II);
`cmFlush(fd);
`
`) ;
`
`Page 73 of 83
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2005
`
`
`
`sesMgr_server.c
`
`7/5/11 2:57 PM
`
`* Function
`*I
`int
`putCollSendMsgCursorHandler(fd, buf)
`int
`fd;
`char
`*buf;
`
`{
`
`bunchOfThings *bunch;
`shaDoubles
`*PCursorD;
`int
`n;
`shminfo
`*PShminfo;
`bunch = (bunchOfThings *) buf;
`pCursorD = (shaDoubles *) bunch->things[1];
`#ifdef USESHAREDMEMFORCURSOR
`if (kernelShastraid.liPAddr == localShaidin[fd] .liPAddr) {
`pShminfo = pSesMgrCollData->pShminfoOut;
`if ( !pShminfo->shmDirty) {
`pShminfo->shmDirty = 1;
`n = strlen(msg) + 1;
`if (shMemReuseSegment(pShminfo, ((n > 10240) 7 n : 10240)) == 0
`) {
`fprintf(stderr, "putCollSendMsgCursorHandler()->couldn't
`shMemReuseSegment!\n");
`
`}
`memcpy(pShminfo->shmAddr, msg, n);
`
`}
`putStringOnChannel(fd, REQ_SEND_MSGSHMCURSOR,
`"putCollSendMsgCursorHandler()");
`ShastraidTagOut(fd, (shastraidTag *) bunch->things[0]);
`ShastraintOut(fd, &pShminfo->shmid);
`cmFlush(fd);
`return;
`
`}
`#end if
`
`I* USESHAREDMEMFORCURSOR *I
`
`putStringOnChannel(fd, REQ_SEND_MSGCURSOR, "putCollSendMsgCursorHandler
`()");
`ShastraidTagOut(fd, (shastraidTag *) bunch->things[0] );
`Cu rso rBi teOut ( fd, pCu rso rD);
`cmFlush(fd);
`
`}
`
`* Function
`*I
`int
`putCollRecvdMsgCursorHandler(fd, buf)
`int
`fd;
`char
`*buf;
`
`{
`
`putStringOnChannel(fd, REQ_RECVD_MSGCURSOR,
`"putCollRecvdMsgCursorHandler()");
`putStringOnChannel(fd, buf, "putCollRecvdMsgCursorHandler()");
`
`Page 74 of 83
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2006
`
`
`
`sesMgr _server. c
`
`7/5/11 2:57 PM
`
`cmFlush(fd);
`
`}
`
`I*
`* Function
`*I
`int
`putSetCollPermsHandler(fd, arg)
`int
`fd;
`char
`*arg;
`
`{
`
`}
`
`shastraidTag
`*PSidTag;
`shastraidTag
`*PPermTag;
`*bunch = (bunchOfThings *) arg;
`bunchOfThings
`pSidTag = (shastraidTag *) bunch->things[0];
`pPermTag = (shastraidTag *) bunch->things[l];
`putStringOnChannel(fd, REQ_SET_COLLPERMS, "putSetCollPermsHandler()");
`ShastraidTagOut(fd, pSidTag);
`ShastraidTagOut(fd, pPermTag);
`cmFlush(fd);
`
`I*
`* Function
`*I
`int
`putSetSesmCollPermsHandler(fd, arg)
`int
`fd;
`char
`*arg;
`
`{
`
`shastraidTag
`*PSidTag;
`shastraidTags
`*PPermTags;
`*bunch = (bunchOfThings *) arg;
`bunchOfThings
`pSidTag = (shastraidTag *) bunch->things[0];
`pPermTags = (shastraidTags *) bunch->things[l];
`putStringOnChannel(fd, REQ_SET_SESMCOLLPERMS,
`"putSetSesmCollPermsHandler()");
`ShastraidTagOut(fd, pSidTag);
`ShastraidTagsOut(fd, pPermTags);
`cmFlush(fd);
`
`}
`
`I*
`* Function
`*I
`int
`putCollSetixnModeHandler(fd, pixnMode)
`int
`fd;
`unsigned long *PixnMode;
`
`Page 75 of 83
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2007
`
`
`
`sesMgr _server. c
`
`7/5/11 2:57 PM
`
`{
`
`}
`
`putStringOnChannel(fd, REQ_SET_IXNMODE,
`ShastraULongOut(fd, pixnMode);
`cmFlush(fd);
`
`11 putCollSetixnModeHandler() 11
`
`) ;
`
`I*
`* Function
`*I
`int
`putCollSetFloorModeHandler(fd, pFloorMode)
`int
`fd;
`unsigned long *PFloorMode;
`
`{
`
`putStringOnChannel(fd, REQ_SET_FLOORMODE,
`
`11 putCollSetFloorModeHandler(
`
`) II )
`
`;
`
`ShastraULongOut(fd, pFloorMode);
`cmFlush(fd);
`
`}
`
`I*
`* Function
`*I
`int
`putCollSetSesFormatHandler(fd, pSesFormat)
`int
`fd;
`unsigned long *PSesFormat;
`
`{
`
`putStringOnChannel(fd, REQ_SET_SESFORMAT,
`
`11 putCollSetSesFormatHandler(
`
`) II )
`
`;
`
`ShastraULongOut(fd, pSesFormat);
`cmFlush(fd);
`
`}
`
`I*
`* Function
`*I
`int
`putCollGrabTokenHandler(fd, pSidTagToken)
`int
`fd;
`shastraidTag
`*PSidTagToken;
`
`{
`
`}
`
`putStringOnChannel(fd, REQ_GRAB_TOKEN,
`ShastraidTagOut(fd, pSidTagToken);
`cmFlush(fd);
`
`11 putCollGrabTokenHandler() 11
`
`) ;
`
`I*
`* Function
`*I
`int
`putCollFreeTokenHandler(fd, pSidTagToken)
`int
`fd;
`
`Page 76 of 83
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2008
`
`
`
`sesMgr _server. c
`
`7/5/11 2:57 PM
`
`shastraidTag
`
`*PSidTagToken;
`
`putStringOnChannel(fd, REQ_FREE_TOKEN, "putCollFreeTokenHandler()");
`ShastraidTagOut(fd, pSidTagToken);
`cmFlush(fd);
`
`{
`
`}
`
`I*
`* Function
`*I
`int
`putCollTellTokenHandler(fd, pSidTagToken)
`int
`fd;
`shastraidTag
`*PSidTagToken;
`
`{
`
`}
`
`putStringOnChannel(fd, REQ_TELL_TOKEN, "putCollTellTokenHandler()");
`ShastraidTagOut(fd, pSidTagToken);
`cmFlush(fd);
`
`I*
`* Function
`*I
`int
`putCollAskTokenHandler(fd, pSidTagToken)
`int
`fd;
`shastraidTag
`*PSidTagToken;
`
`{
`
`}
`
`putStringOnChannel(fd, REQ_ASK_TOKEN, "putCollAskTokenHandler()");
`ShastraidTagOut(fd, pSidTagToken);
`cmFlush(fd);
`
`{
`
`I*
`* Function
`*I
`closedChannelCleanUpHandler(fd)
`int
`fd;
`if (shaKernFlags[fd] == SHAFRONT) {
`collLeaveCleanUpHandler(fd);
`} else {
`mplexUnRegisterChannel(fd);
`I* CHECK actually initiate retry-connection sequence *I
`}
`
`}
`
`I*
`* Function
`
`Page 77 of 83
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2009
`
`
`
`sesMgr _server. c
`
`7/5/11 2:57 PM
`
`*I
`int putCollCommMsgTextHandler(fd, pSmSidTag, pToSidTag, pSidTag, sbMsg)
`int fd;
`shastraidTag *PSmSidTag;
`shastraidTag *PToSidTag;
`shastraidTag *PSidTag;
`char *SbMsg;
`
`{
`
`putStringOnChannel(fd, REQ_COMM_MSGTEXT, "putCollCommMsgTextHandler()")
`
`ShastraidTagOut(fd, pSmSidTag);
`ShastraidTagOut(fd, pToSidTag);
`ShastraidTagOut(fd, pSidTag);
`sendDataString(fd, sbMsg);
`cmFlush(fd);
`
`}
`
`I*
`* Function
`*I
`int collCommMsgTextHandler(fd)
`int fd;
`
`shastraidTag
`shastraidTag
`shastraidTag
`char *SMsg;
`int outFd;
`
`smSidTag;
`toSidTag;
`sidTag;
`
`ShastraidTagin(fd, &smSidTag);
`ShastraidTagin(fd, &toSidTag);
`ShastraidTagin(fd, &sidTag);
`sMsg = cmReceiveString(fd);
`cmAckOk(fd);
`cmFlush(fd);
`
`{
`
`}
`
`switch(routeFrontSidTagToFd(&toSidTag, &outFd,
`"collCommMsgTextHandler()")){
`case route_FRONT:
`putCollCommMsgTextHandler(outFd, &smSidTag, &toSidTag,
`&sidTag, sMsg);
`
`break;
`case route_ERROR:
`default:
`break;
`
`}
`sprintf(sbOutMsgBuf, "Done-- %s\n", REQ_COMM_MSGTEXT);
`showinfo(sbOutMsgBuf);
`
`I*
`* Function
`*I
`
`Page 78 of 83
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2010
`
`
`
`sesMgr _server. c
`
`7/5/11 2:57 PM
`
`int putCollCommMsgTextFileHandler(fd, pSmSidTag, pToSidTag, pSidTag, sbMsg)
`int fd;
`shastraidTag *PSmSidTag;
`shastraidTag *PToSidTag;
`shastraidTag *PSidTag;
`char *SbMsg;
`
`{
`
`putStringOnChannel(fd, REQ_COMM_MSGTEXTFILE,
`"putCollCommMsgTextFileHandler()");
`ShastraidTagOut(fd, pSmSidTag);
`ShastraidTagOut(fd, pToSidTag);
`ShastraidTagOut(fd, pSidTag);
`sendDataString(fd, sbMsg);
`cmFlush(fd);
`
`}
`
`{
`
`}
`
`I*
`* Function
`*I
`int collCommMsgTextFileHandler(fd)
`int fd;
`
`shastraidTag
`shastraidTag
`shastraidTag
`char *SMsg;
`int outFd;
`
`smSidTag;
`toSidTag;
`sidTag;
`
`ShastraidTagin(fd, &smSidTag);
`ShastraidTagin(fd, &toSidTag);
`ShastraidTagin(fd, &sidTag);
`sMsg = cmReceiveString(fd);
`cmAckOk(fd);
`cmFlush(fd);
`
`switch(routeFrontSidTagToFd(&toSidTag, &outFd,
`"collCommMsgTextFileHandler()")){
`case route_FRONT:
`putCollCommMsgTextFileHandler(outFd, &smSidTag, &toSidTag,
`&sidTag, sMsg);
`
`break;
`case route_ERROR:
`default:
`break;
`
`}
`sprintf(sbOutMsgBuf, "Done-- %s\n", REQ_COMM_MSGTEXTFILE);
`showinfo(sbOutMsgBuf);
`
`I*
`* Function
`*I
`int putCollCommMsgAudioHandler(fd, pSmSidTag, pToSidTag, pSidTag, sbMsg)
`
`Page 79 of 83
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2011
`
`
`
`sesMgr_server.c
`
`7/5/11 2:57 PM
`
`int fd;
`shastraidTag *PSmSidTag;
`shastraidTag *PToSidTag;
`shastraidTag *PSidTag;
`char *SbMsg;
`
`putStringOnChannel(fd, REQ_COMM_MSGAUDIO, "putCollCommMsgAudioHandler(
`
`) II )
`
`;
`
`ShastraidTagOut(fd, pSmSidTag);
`ShastraidTagOut(fd, pToSidTag);
`ShastraidTagOut(fd, pSidTag);
`sendDataString(fd, sbMsg);
`cmFlush(fd);
`
`{
`
`}
`
`I*
`* Function
`*I
`int collCommMsgAudioHandler(fd)
`int fd;
`
`{
`
`shastraidTag
`shastraidTag
`shastraidTag
`char *SMsg;
`int outFd;
`
`smSidTag;
`toSidTag;
`sidTag;
`
`ShastraidTagin(fd, &smSidTag);
`ShastraidTagin(fd, &toSidTag);
`ShastraidTagin(fd, &sidTag);
`sMsg = cmReceiveString(fd);
`cmAckOk(fd);
`cmFlush(fd);
`
`switch(routeFrontSidTagToFd(&toSidTag, &outFd,
`"collCommMsgAudioHandler()")){
`case route_FRONT:
`putCollCommMsgAudioHandler(outFd, &smSidTag, &toSidTag,
`&sidTag, sMsg);
`
`break;
`case route_ERROR:
`default:
`break;
`
`}
`sprintf(sbOutMsgBuf, "Done-- %s\n", REQ_COMM_MSGAUDIO);
`showinfo(sbOutMsgBuf);
`
`}
`
`I*
`* Function
`*I
`int putCollCommMsgAudioFileHandler(fd, pSidTag, pToSidTag, pSmSidTag, sbMsg
`)
`
`Page 80 of 83
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2012
`
`
`
`sesMgr_server.c
`
`7/5/11 2:57 PM
`
`int fd;
`shastraidTag *PSidTag;
`shastraidTag *PToSidTag;
`shastraidTag *PSmSidTag;
`char *SbMsg;
`
`putStringOnChannel(fd, REQ_COMM_MSGAUDIOFILE,
`"putCollCommMsgAudioFileHandler()");
`ShastraidTagOut(fd, pSmSidTag);
`ShastraidTagOut(fd, pToSidTag);
`ShastraidTagOut(fd, pSidTag);
`sendDataString(fd, sbMsg);
`cmFlush(fd);
`
`{
`
`}
`
`I*
`* Function
`*I
`int collCommMsgAudioFileHandler(fd)
`int fd;
`
`{
`
`shastraidTag
`shastraidTag
`shastraidTag
`char *SMsg;
`int outFd;
`
`smSidTag;
`toSidTag;
`sidTag;
`
`ShastraidTagin(fd, &smSidTag);
`ShastraidTagin(fd, &toSidTag);
`ShastraidTagin(fd, &sidTag);
`sMsg = cmReceiveString(fd);
`cmAckOk(fd);
`cmFlush(fd);
`
`switch(routeFrontSidTagToFd(&toSidTag, &outFd,
`"collCommMsgAudioFileHandler()")){
`case route_FRONT:
`putCollCommMsgAudioFileHandler(outFd, &smSidTag, &toSidTag,
`&sidTag, sMsg);
`
`break;
`case route_ERROR:
`default:
`break;
`
`}
`sprintf(sbOutMsgBuf, "Done-- %s\n", REQ_COMM_MSGAUDIOFILE);
`showinfo(sbOutMsgBuf);
`
`}
`
`I*
`* Function
`*I
`int putCollCommMsgVideoHandler(fd, pSmSidTag, pToSidTag, pSidTag, sbMsg)
`int fd;
`
`Page 81 of 83
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2013
`
`
`
`sesMgr_server.c
`
`7/5/11 2:57 PM
`
`shastraidTag *PSmSidTag;
`shastraidTag *PToSidTag;
`shastraidTag *PSidTag;
`char *SbMsg;
`
`putStringOnChannel(fd, REQ_COMM_MSGVIDEO, "putCollCommMsgVideoHandler(
`
`) II )
`
`;
`
`ShastraidTagOut(fd, pSmSidTag);
`ShastraidTagOut(fd, pToSidTag);
`ShastraidTagOut(fd, pSidTag);
`sendDataString(fd, sbMsg);
`cmFlush(fd);
`
`{
`
`}
`
`I*
`* Function
`*I
`int collCommMsgVideoHandler(fd)
`int fd;
`
`shastraidTag
`shastraidTag
`shastraidTag
`char *SMsg;
`int outFd;
`
`smSidTag;
`toSidTag;
`sidTag;
`
`ShastraidTagin(fd, &smSidTag);
`ShastraidTagin(fd, &toSidTag);
`ShastraidTagin(fd, &sidTag);
`sMsg = cmReceiveString(fd);
`cmAckOk(fd);
`cmFlush(fd);
`
`{
`
`}
`
`switch(routeFrontSidTagToFd(&toSidTag, &outFd,
`"collCommMsgVideoHandler()")){
`case route_FRONT:
`putCollCommMsgVideoHandler(outFd, &smSidTag, &toSidTag,
`&sidTag, sMsg);
`
`break;
`case route_ERROR:
`default:
`break;
`
`}
`sprintf(sbOutMsgBuf, "Done-- %s\n", REQ_COMM_MSGVIDEO);
`showinfo(sbOutMsgBuf);
`
`I*
`* Function
`*I
`int putCollCommMsgVideoFileHandler(fd, pSmSidTag, pToSidTag, pSidTag, sbMsg
`)
`int fd;
`
`Page 82 of 83
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2014
`
`
`
`sesMgr_server.c
`
`7/5/11 2:57 PM
`
`shastraidTag *PSmSidTag;
`shastraidTag *PToSidTag;
`shastraidTag *PSidTag;
`char *SbMsg;
`
`putStringOnChannel(fd, REQ_COMM_MSGVIDEOFILE,
`"putCollCommMsgVideoFileHandler()");
`ShastraidTagOut(fd, pSmSidTag);
`ShastraidTagOut(fd, pToSidTag);
`ShastraidTagOut(fd, pSidTag);
`sendDataString(fd, sbMsg);
`cmFlush(fd);
`
`{
`
`}
`
`I*
`* Function
`*I
`int collCommMsgVideoFileHandler(fd)
`int fd;
`
`shastraidTag
`shastraidTag
`shastraidTag
`char *SMsg;
`int outFd;
`
`smSidTag;
`toSidTag;
`sidTag;
`
`ShastraidTagin(fd, &smSidTag);
`ShastraidTagin(fd, &toSidTag);
`ShastraidTagin(fd, &sidTag);
`sMsg = cmReceiveString(fd);
`cmAckOk(fd);
`cmFlush(fd);
`
`{
`
`}
`
`switch(routeFrontSidTagToFd(&toSidTag, &outFd,
`"collCommMsgVideoFileHandler()")){
`case route_FRONT:
`putCollCommMsgVideoFileHandler(outFd, &smSidTag, &toSidTag,
`&sidTag, sMsg);
`
`break;
`case route_ERROR:
`default:
`break;
`
`}
`sprintf(sbOutMsgBuf, "Done-- %s\n", REQ_COMM_MSGVIDEOFILE);
`showinfo(sbOutMsgBuf);
`
`Page 83 of 83
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2015
`
`
`
`sesMgrMainCB. c
`
`7/5/11 2:57 PM
`
`I**************************************************************************
`***I
`I**************************************************************************
`***I
`**I
`I** This SHASTRA software is not in the Public Domain. It is distributed on
`**I
`I** a person to person basis, solely for educational use and permission is
`**I
`I** NOT granted for its transfer to anyone or for its use in any commercial
`**I
`I** product. There is NO warranty on the available software and neither
`**I
`I** Purdue University nor the Applied Algebra and Geometry group directed
`**I
`I** by C. Bajaj accept responsibility for the consequences of its use.
`**I
`**I
`I**************************************************************************
`***I
`I**************************************************************************
`***I
`#include <stdio.h>
`
`#include <Xlliintrinsic.h>
`#include <XlliStringDefs.h>
`#include <XlliShell.h>
`
`#include <XmiForm.h>
`#include <Xmllabel.h>
`#include <XmiText.h>
`#include <XmiRowColumn.h>
`
`#include <shastraluitoolslstrlistUtilities.h>
`#include <shastraluitoolslbuttonBox.h>
`#include <shastraluitoolslconfirmCB.h>
`#include <shastraluitoolslchooseOne.h>
`#include <shastraluitoolslcallbackArg.h>
`
`#include <shastraldatacommlshastraidH.h>
`#include <shastraldatacommlshastraidTagH.h>
`
`#include <shastralshautilslshautils.h>
`#include <shastralshautilslkernelFronts.h>
`#include <shastralshautilslsesMgrFronts.h>
`
`#include <shastralsessionlsesMgrMainCB.h>
`#include <shastralsessionlsesMgr.h>
`#include <shastralsessionlsesMgr_client.h>
`#include <shastralsessionlsesMgrState.h>
`
`Page 1 of 9
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2016
`
`
`
`sesMgrMainCB. c
`
`7/5/11 2:57 PM
`
`I*
`* Function: createMainCmdShell (private)
`*
`*I
`Widget
`createMainCmdShell(wgParent)
`Widget
`wgParent;
`
`{
`
`Widget
`Widget
`XmString
`char *SName;
`
`wgMainCmdShell, wgMainCmdForm;
`wgName;
`xmName;
`
`I* Create the menu popup shell *I
`wgMainCmdShell = XtVaCreatePopupShell("mainCmdShell",
`topLevelShellWidgetClass, wgParent, NULL);
`
`I*
`* Create the menu form widget used to position the widgets inside
`* the
`*I
`I* menu window *I
`wgMainCmdForm = XtVaCreateManagedWidget("mainCmdForm",
`xmFormWidgetClass,
`wgMainCmdShell, NULL);
`sName = resolveNameFrom2Bases(pSesMgrAppData->sDirBase,
`pSesMgrAppData->sDirDefs, "bitmapslterminal.xbm");
`wgName = XtVaCreateManagedWidget("hostNameLabel", xmLabelWidgetClass,
`wgMainCmdForm,
`XmNbackgroundPixmap,
`convertStringToPixmap(wgMainCmdForm, sName),
`NULL);
`xmName = XmStringCreateSimple(shortenName(kernelHostName));
`XtVaSetValues(wgName, XmNlabelString, (XtArgVal) xmName, NULL);
`XmStringFree(xmName);
`
`I*
`* Create the button box and state box objects that are inside the
`* menu
`*I
`I* window *I
`
`createMainCmdButtonBox(wgMainCmdForm);
`createMainDbgButtonBox(wgMainCmdForm);
`createTextStatusBox(wgMainCmdForm);
`
`return wgMainCmdShell;
`
`}
`
`I*
`* Function: createMainCmdButtonBox (private)
`
`Page 2 of 9
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2017
`
`
`
`sesMgrMainCB. c
`
`7/5/11 2:57 PM
`
`*I
`Widget
`Widget
`chooseOne
`chooseOne
`chooseOne
`chooseOne
`char
`char
`char
`char
`char
`
`wgMainKill;
`wgMainQuit;
`*PCOShastraSesMgr;
`*PCOShastraKern;
`*PCOShastraFront;
`*PCOShastraSys;
`**rgsbShastraKern;
`**rgsbShastraSesMgr;
`**rgsbShastraFront;
`**rgsbShastraSys;
`*rgsbNull[] = {NULL};
`
`{
`
`void
`createMainCmdButtonBox(wgParent)
`Widget
`wgParent;
`abu[] = {
`static button
`{"kill", &wgMainKill},
`{"quit", &wgMainQuit},
`{NULL, NULL}
`
`};
`
`buttonBoxCreate("mainBtnsBox", wgParent, abu, True);
`
`I* Create a choose one object to select one system *I
`pcoShastraFront = chooseOneCreate(NULL, coNoinitialHighlight,
`wgMainKill, chooseOneTestCB,
`(XtPointer) pcbArgPopup, wgMainKill,
`"Choose Local Front-end", 200, NULL);
`chooseOneChangeList(pcoShastraFront, rgsbNull, coNoinitialHighlight);
`
`I* Create a choose one object to select one system *I
`pcoShastraSesMgr = chooseOneCreate(NULL, coNoinitialHighlight,
`wgMainKill, chooseOneTestCB,
`(XtPointer) pcbArgPopup, wgMainKill,
`"Choose Remote SesMgr", 200, NULL);
`chooseOneChangeList(pcoShastraSesMgr, rgsbNull, coNoinitialHighlight);
`
`I* Create a choose one object to select one system *I
`pcoShastraKern = chooseOneCreate(NULL, coNoinitialHighlight,
`wgMainKill, chooseOneTestCB,
`(XtPointer) pcbArgPopup, wgMainKill,
`"Choose Remote Kernel", 200, NULL);
`chooseOneChangeList(pcoShastraKern, rgsbNull, coNoinitialHighlight);
`
`I* Create a choose one object to select one system *I
`pcoShastraSys = chooseOneCreate(NULL, coNoinitialHighlight,
`wgMainKill, chooseOneTestCB,
`(XtPointer) pcbArgPopup, wgMainKill,
`"Choose Remote System", 200, NULL);
`chooseOneChangeList(pcoShastraSys, rgsbNull, coNoinitialHighlight);
`
`Page 3 of 9
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2018
`
`
`
`sesMgrMainCB. c
`
`7/5/11 2:57 PM
`
`XtAddCallback(wgMainQuit, XmNactivateCallback, mainQuitCB, NULL);
`XtAddCallback(wgMainKill, XmNactivateCallback, mainKillCB,
`(XtPointer) pcoShastraFront);
`
`}
`
`I*
`* Function: createTextStatusBox (private)
`*I
`Widget
`
`wgStatusText;
`
`void
`createTextStatusBox(wgParent)
`Widget
`wgParent;
`
`{
`
`}
`
`args[8];
`n;
`
`Arg
`int
`n = 0;
`XtSetArg(args[n], XmNrows, 5);
`n++;
`XtSetArg(args[n], XmNcolumns, 40);
`n++;
`XtSetArg(args[n], XmNeditable, False);
`n++;
`XtSetArg(args[n], XmNeditMode, XmMULTI_LINE_EDIT);
`n++;
`XtSetArg(args[n], XmNscrollBarDisplayPolicy, XmAS_NEEDED);
`n++;
`wgStatusText = XmCreateScrolledText(wgParent, "mainStatusText",
`a rg s, n) ;
`XtManageChild(wgStatusText);
`
`I*
`* Function: createMainDbgButtonBox (private)
`*I
`Widget
`Widget
`Widget
`Widget
`Widget
`Widget
`
`wgDbgCheckSys;
`wgDbgGetSys;
`wgDbgGetKern;
`wgDbgCheckSmFr;
`wgDbgGetSmFr;
`wgDbgGetSesm;
`
`{
`
`void
`createMainDbgButtonBox(wgParent)
`Widget
`wgParent;
`abu[] = {
`static button
`{"getKern", &wgDbgGetKern},
`{"getSys", &wgDbgGetSys},
`{"checkSys", &wgDbgCheckSys},
`{"getSesm", &wgDbgGetSesm},
`
`Page 4 of 9
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2019
`
`
`
`sesMgrMainCB. c
`
`7/5/11 2:57 PM
`
`{"getSmFr", &wgDbgGetSmFr},
`{"checkSmFr", &wgDbgCheckSmFr},
`{NULL, NULL}
`
`};
`
`buttonBoxCreate("dbgBtnsBox", wgParent, abu, True);
`
`XtAddCallback(wgDbgCheckSys, XmNactivateCallback, dbgCheckSysCB,
`(XtPointer) pcoShastraKern);
`XtAddCallback(wgDbgGetSys, XmNactivateCallback, dbgGetSysCB,
`(XtPointer) pcoShastraKern);
`XtAddCallback(wgDbgGetKern, XmNactivateCallback, dbgGetKernCB,
`(XtPointer) NULL);
`XtAddCallback(wgDbgCheckSmFr, XmNactivateCallback, dbgCheckSmFrCB,
`(XtPointer) pcoShastraSesMgr);
`XtAddCallback(wgDbgGetSmFr, XmNactivateCallback, dbgGetSmFrCB,
`(XtPointer) pcoShastraSesMgr);
`XtAddCallback(wgDbgGetSesm, XmNactivateCallback, dbgGetSesmCB,
`(XtPointer) NULL);
`
`}
`
`{
`
`void
`mainKillCB(widget,
`Widget
`XtPointer
`
`chooseOne
`
`xpClientData, call_data)
`widget;
`xpClientData, call_data;
`*PCO = (chooseOne *) xpClientData;
`st rcpy ( pcbArgPopup->msg, "chooseSystem");
`pcbArgPopup->operation = endSystemOprn;
`pcbArgPopup->fWantOprn = 1;
`pcbArgPopup->fWantArg = 0;
`I* no call for name *I
`pcbArgPopup->wginitiator = widget;
`I* Pop up the choose one object *I
`chooseOneMobExec(pco, widget);
`
`}
`
`{
`
`void
`mainQuitCB(widget,
`Widget
`XtPointer
`
`closure, call_data)
`widget;
`closure, call_data;
`
`strcpy(pcbArgPopup->msg, "Confirm Action");
`strcpy(pcbArgPopup->prompt, "Please Confirm Action");
`pcbArgPopup->operation = quitOprn;
`pcbArgPopup->fWantOprn = 1;
`pcbArgPopup->fWantArg = 0;
`I* call for name *I
`pcbArgPopup->wginitiator = widget;
`ConfirmPopup(widget);
`
`}
`
`Page 5 of 9
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2020
`
`
`
`sesMgrMainCB.c
`
`7/5/11 2:57 PM
`
`{
`
`chooseOne
`
`void
`dbgCheckSysCB(wg 1 xpClientData 1 call_data)
`Widget
`wg;
`XtPointer
`xpClientData 1 call_data;
`*PCO = (chooseOne *) xpClientData;
`II chooseKe rne l 11
`st rcpy ( pcbA rgPopup->msg 1
`pcbArgPopup->operation = dbgCheckSysOprn;
`pcbArgPopup->fWantOprn = 1;
`pcbArgPopup->fWantArg = 0;
`I* no call for name *I
`pcbArgPopup->wginitiator = wg;
`I* Pop up the choose one object *I
`chooseOneMobExec(pco 1 wg);
`
`) ;
`
`}
`
`{
`
`chooseOne
`
`void
`dbgGetSysCB(wg 1 xpClientData 1 call_data)
`Widget
`wg;
`XtPointer
`xpClientData 1 call_data;
`*PCO = (chooseOne *) xpClientData;
`II chooseKe rn 11
`s t rcpy ( pcbA rg Popu p->msg 1
`pcbArgPopup->operation = getShaKernFridOprn;
`pcbArgPopup->fWantOprn = 1;
`pcbArgPopup->fWantArg = 0;
`I* no call for name *I
`pcbArgPopup->wginitiator = wg;
`I* Pop up the choose one object *I
`chooseOneMobExec(pco 1 wg);
`
`)
`
`;
`
`void
`dbgGetKernCB(wg 1 xpClientData 1 call_data)
`Widget
`wg;
`XtPointer
`xpClientData 1 call_data;
`
`}
`
`{
`
`}
`
`getShaKernidOprn(0);
`
`void
`dbgCheckSysOprn(iObjindex)
`int
`iObjindex;
`
`{
`
`shast raids
`shast raid
`
`*PSids;
`*PSid;
`
`Page 6 of 9
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2021
`
`
`
`sesMgrMainCB. c
`
`7/5/11 2:57 PM
`
`int
`
`kernFd;
`
`pSid = shastraKernids.shastraids_val[iObjindex];
`kernFd = locateKernFronts(pSid);
`if (kernFd < 0) {
`fprintf(stderr, "dbgCheckSysOprn()->kernFd = %d\n", kernFd);
`return;
`
`}
`pSids = getKernFrontSids(pSid);
`
`if (rgsbShastraSys !=NULL) {
`strListDestroy(rgsbShastraSys);
`
`}
`rgsbShastraSys = pSids2StrTab(pSids, PSIDSHOWALL);
`chooseOneChangeList(pcoShastraSys, rgsbShastraSys, coNoinitialHighlight
`) ;
`
`strcpy(pcbArgPopup->msg, "chooseSys");
`pcbArgPopup->operation = NULL;
`pcbArgPopup->fWantOprn = 0;
`pcbArgPopup->fWantArg = 0;
`
`I* no call for name *I
`
`I* Pop up the choose one object *I
`chooseOneMobExec(pcoShastraSys, pcbArgPopup->wginitiator);
`
`}
`
`void
`dbgCheckSmFrCB(wg, xpClientData, call_data)
`Widget
`wg;
`XtPointer
`xpClientData, call_data;
`
`{
`
`chooseOne
`
`*PCO = (chooseOne *) xpClientData;
`
`st rcpy ( pcbArgPopup->msg, "chooseSesMg r");
`pcbArgPopup->operation = dbgCheckSmFrOprn;
`pcbArgPopup->fWantOprn = 1;
`I* no call for name *I
`pcbArgPopup->fWantArg = 0;
`pcbArgPopup->wginitiator = wg;
`
`I* Pop up the choose one object *I
`chooseOneMobExec(pco, wg);
`
`}
`
`void
`dbgGetSmFrCB(wg,
`Widget
`XtPointer
`
`{
`
`xpClientData, call_data)
`wg;
`xpClientData, call_data;
`
`Page 7 of 9
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2022
`
`
`
`sesMgrMainCB. c
`
`7/5/11 2:57 PM
`
`chooseOne
`
`*PCO = (chooseOne *) xpClientData;
`
`strcpy(pcbArgPopup->msg 1 "chooseSesm");
`pcbArgPopup->operation = getShaSesmFridOprn;
`pcbArgPopup->fWantOprn = 1;
`I* no call for name *I
`pcbArgPopup->fWantArg = 0;
`pcbArgPopup->wginitiator = wg;
`
`I* Pop up the choose one object *I
`chooseOneMobExec(pco 1 wg);
`
`}
`
`void
`dbgGetSesmCB(wg 1 xpClientData 1 call_data)
`Widget
`wg;
`XtPointer
`xpClientData 1 call_data;
`
`{
`
`}
`
`getShaSesmidOprn(0);
`
`void
`dbgCheckSmFrOprn(iObjindex)
`int
`iObjindex;
`
`{
`
`shastraidTags
`shastraidTag
`int
`
`*PSidTags;
`*PSidTag;
`smindex;
`
`pSidTag = (shastraidTag *) & shastraSesmids.shastraids_val[iObjindex]->
`lSIDTag;
`smindex = locateSesmFronts(pSidTag);
`if (smindex < 0) {
`fp rintf ( stde rr 1 "dbgCheckSysOp rn () ->smindex = %d\n" 1 smindex);
`return;
`
`}
`pSidTags = getSesmFrontSidTags(pSidTag);
`
`if (rgsbShastraSys !=NULL) {
`strlistDestroy(rgsbShastraSys);
`
`}
`rgsbShastraSys = mapSidTags2StrTab(pSidTags 1 PSIDSHOWALL);
`chooseOneChangeList(pcoShastraSys 1
`rgsbShastraSys 1 coNoinitialHighlight
`) ;
`
`strcpy(pcbArgPopup->msg 1 "chooseSys");
`strcpy(pcbArgPopup->prompt 1 "Enter Password:");
`pcbArgPopup->operation = endSystemOprn;
`pcbArgPopup->fWantOprn = 1;
`pcbArgPopup->fWantArg = 1;
`
`I* call for name *I
`
`I* Pop up the choose one object *I
`chooseOneMobExec(pcoShastraSys 1 pcbArgPopup->wginitiator);
`
`Page 8 of 9
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2023
`
`
`
`sesMgrMainCB. c
`
`}
`
`7/5/11 2:57 PM
`
`I*
`* Function
`*I
`void
`outputTextToWidget(s, wg, pCurrentPosn)
`char
`*S;
`Widget
`wg;
`XmTextPosition *PCurrentPosn;
`
`{
`
`textBlock;
`XmTextBlock
`currentPosn;
`XmTextPosition
`if (pCurrentPosn == 0) {
`currentPosn = XmTextGetinsertionPosition(wg);
`pCurrentPosn = ¤tPosn;
`} else {
`XmTextSetinsertionPosition(wg, *PCurrentPosn);
`
`}
`XmTextReplace(wg, *PCurrentPosn, *PCurrentPosn, s);
`*PCurrentPosn += strlen(s);
`
`#ifdef WANTTHIS
`I* Save output in buffer *I
`if (strlen(saveBuffer) + strlen(s) + 1 <= MAXLEN) {
`strcat(saveBuffer, s);
`} else {
`printf("Save-buffer overflow.\n");
`
`}
`#end if
`}
`
`I* WANTTHIS *I
`
`Page 9 of 9
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2024
`
`
`
`contouriO.c
`
`7/5/11 2:58 PM
`
`I**************************************************************************
`***I
`I**************************************************************************
`***I
`**I
`I** This SHASTRA software is not in the Public Domain. It is distributed on
`**I
`I** a person to person basis, solely for educational use and permission is
`**I
`I** NOT granted for its transfer to anyone or for its use in any commercial
`**I
`I** product. There is NO warranty on the available software and neither
`**I
`I** Purdue University nor the Applied Algebra and Geometry group directed
`**I
`I** by C. Bajaj accept responsibility for the consequences of its use.
`**I
`**I
`I**************************************************************************
`***I
`I**************************************************************************
`***I
`#include <stdio.h>
`
`#include <shastraldrawldrawdata.h>
`#include <shastraldrawlpict.h>
`#include <shastralnetworklmplex.h>
`#include <shastralnetworklserver.h>
`#include <shastralsolidlimageiO.h>
`
`void
`int));
`
`gene rateContou rs F romPict ( P rotS ( pictData *, int, int, int,
`
`*
`mlineData
`readlineimageFD(fd)
`int
`fd;
`
`{
`
`int
`
`i 1
`
`j ;
`
`*mline;
`*line;
`
`mlineData
`lineData
`char *Sbin;
`mline = (mlineData *) malloc(sizeof(mlineData));
`sbin = cmReceiveString(fd);
`sscanf(sbin, "%d", &mline->nlines);
`free(sbin);
`mline->lines = (lineData *) malloc(sizeof(lineData) *
`mline->nlines);
`
`Page 1 of 4
`
`Petitioner Microsoft Corporation, Ex. 1002, p. 2025
`
`
`
`contouriO.c
`
`7/5/11 2:58 PM
`
`i < mline->nlines; i++) {
`for (i = 0;
`line= &mline->lines[i];
`sbin = cmReceiveString(fd);
`sscanf(sbin, "%d", &line->number);
`free(sbin);
`line->array = (double (*) [3]) malloc(sizeof(double) *
`3 * line->number);
`
`for (j = 0; j < line->number; j++) {
`sbin = cmReceiveString(fd);
`sscanf(sbin, "%lf%lf%lf",
`&line->array[j] [0],
`&line->array[j] [1],
`&line->array[j] [2]);
`free(sbin);
`
`}
`
`}
`return mline;
`
`}
`*
`mlineData
`readlineimage(inStream)
`FILE
`*inStream;
`
`{
`
`int
`
`mlineData
`lineData
`
`i 1
`
`j ;
`
`*mline;
`*line;
`
`mline = (mlineData *) malloc(sizeof(mlineData));
`fscanf(inStream, "%d", &