OSDN Git Service

(none)
[hos/hos-v4a.git] / aplfw / library / container / streambuf / streambuf_sendbuf.c
1 /** 
2  *  Hyper Operating System  Application Framework
3  *
4  * @file  streambuf.h
5  * @brief %jp{ストリームデータ用バッファクラス}
6  *
7  * Copyright (C) 2002-2007 by Project HOS
8  * http://sourceforge.jp/projects/hos/
9  */
10
11
12 #include "streambuf_local.h"
13
14
15 /** バッファ内のデータの送信(省コピー) */
16 void StreamBuf_SendBuf(C_STREAMBUF *self, unsigned int uiSize)
17 {
18         unsigned int uiNextTail;
19         
20         /* サイズチェック */
21         if ( uiSize == 0 )
22         {
23                 return;
24         }
25
26         /* 次のポインタ位置計算 */
27         uiNextTail = self->uiTail + uiSize;
28         if ( uiNextTail >= self->uiBufSize )
29         {
30                 uiNextTail = 0;
31         }
32         self->uiTail = uiNextTail;
33 }
34
35
36 /* end of file */