diff --git a/comp/src/gb.form/.project b/comp/src/gb.form/.project index 72e8e6ce5..9b1cbe8f9 100644 --- a/comp/src/gb.form/.project +++ b/comp/src/gb.form/.project @@ -1,7 +1,7 @@ # Gambas Project File 3.0 # Compiled with Gambas 3.5.90 Title=More controls for graphical components -Startup=FIconView +Startup=FLCDLabel Version=3.5.90 VersionFile=1 Component=gb.image diff --git a/comp/src/gb.form/.src/File/Bookmark/CBookmarkList.class b/comp/src/gb.form/.src/File/Bookmark/CBookmarkList.class index 6f0c9fb01..47c876ccb 100644 --- a/comp/src/gb.form/.src/File/Bookmark/CBookmarkList.class +++ b/comp/src/gb.form/.src/File/Bookmark/CBookmarkList.class @@ -111,11 +111,13 @@ Public Sub FindBookmark({Link} As String) As CBookmark Dim hBookmark As CBookmark For Each hBookmark In Me + If Not hBookmark.Exist() Then Continue If hBookmark.Link = {Link} Then Return hBookmark Next If Left({Link}) = "/" Then For Each hBookmark In Me + If Not hBookmark.Exist() Then Continue If hBookmark.Path = {Link} Then Return hBookmark Next Endif @@ -134,6 +136,7 @@ Public Sub FindBest(sDir As String) As CBookmark aDir = Split(sDir, "/") For Each hBookmark In Me + If Not hBookmark.Exist() Then Continue aBook = Split(hBookmark.Path, "/") For iInd = 0 To Min(aDir.Max, aBook.Max) If aBook[iInd] <> aDir[iInd] Then Break diff --git a/comp/src/gb.form/.src/File/Chooser/FDirChooser.class b/comp/src/gb.form/.src/File/Chooser/FDirChooser.class index 572955103..115d8a3fb 100644 --- a/comp/src/gb.form/.src/File/Chooser/FDirChooser.class +++ b/comp/src/gb.form/.src/File/Chooser/FDirChooser.class @@ -257,7 +257,7 @@ End Public Sub SetDir(sDir As String) If sDir = dvwChoose.Current Then Return - + If IsBookmarkVisible() Then SetBookmark($hBookmarkList.FindBest(sDir)) Endif @@ -356,25 +356,30 @@ Public Function GetPath() As String End Public Sub SetPath(sPath As String) + + Dim bError As Boolean + If Not Exist(sPath) Then bError = True + If txtFile.ReadOnly Then SetDir(sPath) Else SetDir(File.Dir(sPath)) Endif - If GetMulti() Then Return + If Not GetMulti() Then - 'DEBUG dvwChoose.Current;; File.Dir(sPath) - 'IF dvwChoose.Current = File.Dir(sPath) THEN - fvwChoose.Current = File.Name(sPath) - If txtFile.ReadOnly Then - txtFile.Text = fvwChoose.Current - Else - txtFile.Text = File.Name(sPath) + fvwChoose.Current = File.Name(sPath) + If txtFile.ReadOnly Then + txtFile.Text = fvwChoose.Current + Else + txtFile.Text = File.Name(sPath) + Endif + Endif - 'ENDIF + If bError Then Message.Error(("Path not found:") & "\n\n" & sPath) + End diff --git a/comp/src/gb.form/.src/Test/FLCDLabel.form b/comp/src/gb.form/.src/Test/FLCDLabel.form index 82ada39da..eab50ac3e 100644 --- a/comp/src/gb.form/.src/Test/FLCDLabel.form +++ b/comp/src/gb.form/.src/Test/FLCDLabel.form @@ -2,14 +2,14 @@ { Form Form MoveScaled(0,0,44,19) + Background = &H000000& Arrangement = Arrange.Fill { LCDLabel2 LCDLabel - MoveScaled(2,3,29,11) - Background = &H000000& - Foreground = &HCFFFBF& + MoveScaled(5,3,29,11) + Foreground = &HFFFFFF& + Text = ("12:34") Alignment = Align.Center Padding = 8 - HighlightColor = &HFF7F00& } { Timer1 #Timer #MoveScaled(36,11) diff --git a/comp/src/gb.media.form/.component b/comp/src/gb.media.form/.component new file mode 100644 index 000000000..f5dfafb72 --- /dev/null +++ b/comp/src/gb.media.form/.component @@ -0,0 +1,4 @@ +[Component] +Key=gb.media.form +Version=3.5.90 +Needs=Form diff --git a/comp/src/gb.media.form/.directory b/comp/src/gb.media.form/.directory new file mode 100644 index 000000000..06dab1c8a --- /dev/null +++ b/comp/src/gb.media.form/.directory @@ -0,0 +1,2 @@ +[Desktop Entry] +Icon=./.icon.png diff --git a/comp/src/gb.media.form/.gitignore b/comp/src/gb.media.form/.gitignore new file mode 100644 index 000000000..cb95c3b71 --- /dev/null +++ b/comp/src/gb.media.form/.gitignore @@ -0,0 +1,13 @@ +#---- Gambas files to ignore (v1) +*.gambas +.lock +*~ +core +core.* +vgcore +vgcore.* +.kdbg* +.*.prof +.lang/*.pot +.gambas/* +#---- diff --git a/comp/src/gb.media.form/.hidden/control/mediaview.png b/comp/src/gb.media.form/.hidden/control/mediaview.png new file mode 100644 index 000000000..014d66320 Binary files /dev/null and b/comp/src/gb.media.form/.hidden/control/mediaview.png differ diff --git a/comp/src/gb.media.form/.icon.png b/comp/src/gb.media.form/.icon.png new file mode 100644 index 000000000..f45d027f8 Binary files /dev/null and b/comp/src/gb.media.form/.icon.png differ diff --git a/comp/src/gb.media.form/.info b/comp/src/gb.media.form/.info new file mode 100644 index 000000000..36fb0c938 --- /dev/null +++ b/comp/src/gb.media.form/.info @@ -0,0 +1,31 @@ +#MediaView +UserControl +C +_IsControl +C +b +-1 +_Group +C +s +Media +_Properties +C +s +*,Border,Control=True,URL{Path} +URL +p +s + +Border +p +b + +Control +p +b + +_new +m + + diff --git a/comp/src/gb.media.form/.list b/comp/src/gb.media.form/.list new file mode 100644 index 000000000..461807bf8 --- /dev/null +++ b/comp/src/gb.media.form/.list @@ -0,0 +1 @@ +MediaView diff --git a/comp/src/gb.media.form/.project b/comp/src/gb.media.form/.project new file mode 100644 index 000000000..a3de939d2 --- /dev/null +++ b/comp/src/gb.media.form/.project @@ -0,0 +1,14 @@ +# Gambas Project File 3.0 +# Compiled with Gambas 3.5.90 +Title=gb.media.form +Startup=FTest +Icon=video.png +Version=3.5.90 +VersionFile=1 +Component=gb.image +Component=gb.gui +Component=gb.form +Component=gb.media +TabSize=2 +Type=Component +Packager=1 diff --git a/comp/src/gb.media.form/.src/FMediaPlayer.class b/comp/src/gb.media.form/.src/FMediaPlayer.class new file mode 100644 index 000000000..0a6501fc3 --- /dev/null +++ b/comp/src/gb.media.form/.src/FMediaPlayer.class @@ -0,0 +1,235 @@ +' Gambas class file + +'Static Private $hLogo As Image + +Private $hPlayer As MediaPlayer +Private $hImage As MediaControl +Private $fPos As Float +Private $fLength As Float + +Private $hPause1 As Panel +Private $hPause2 As Panel +Private $iMute As Integer + +Private Sub MakeMediaPlayer() + + If $hPlayer Then Return + + $hPlayer = New MediaPlayer As "MediaPlayer" + '$hFilter = New MediaFilter($hPlayer) + $hImage = New MediaControl($hPlayer, "ximagesink") + $hPlayer.Video.Output = $hImage + '$hImage.SetWindow(dwgVideo) + + ' $aVisualisation = New MediaControl[] + ' AddVisualisation("", "") + ' AddVisualisation("goom", "Goom") + ' AddVisualisation("goom2k1", "Goom2") + ' AddVisualisation("libvisual_bumpscope", "Bump") + ' AddVisualisation("libvisual_corona", "Corona") + ' AddVisualisation("libvisual_infinite", "Infinite") + ' AddVisualisation("libvisual_jakdaw", "Jakdaw") + ' AddVisualisation("libvisual_jess", "Jess") + ' AddVisualisation("monoscope", "Mono") + ' AddVisualisation("libvisual_oinksie", "Oinksie") + ' AddVisualisation("libvisual_lv_analyzer", "Analyzer") + ' AddVisualisation("libvisual_lv_scope", "Scope") + ' AddVisualisation("spacescope", "Space") + ' AddVisualisation("spectrascope", "Spectra") + ' AddVisualisation("synaescope", "Synae") + ' AddVisualisation("wavescope", "Wave") + ' + ' $iVisualisation = 0 + ' UpdateVisualisation + +End + +Private Sub ShowPause() + + If $hPause1 Then Return + Object.Lock(dwgVideo) + $hPause1 = New Panel(dwgVideo) + $hPause1.Background = Color.White + $hPause2 = New Panel(dwgVideo) + $hPause2.Background = Color.White + Object.Unlock(dwgVideo) + dwgVideo_Arrange + +End + +Private Sub HidePause() + + If Not $hPause1 Then Return + Object.Lock(dwgVideo) + $hPause1.Delete + $hPause2.Delete + $hPause1 = Null + $hPause2 = Null + Object.Unlock(dwgVideo) + +End + + +Public Sub SetUrl(sUrl As String) + + MakeMediaPlayer + $hPlayer.URL = Media.URL(sUrl) + +End + +Public Sub btnPlay_Click() + + If Not $hPlayer Then Return + timTime.Start + dwgTime.Refresh + sldVolume_Change + $hImage.SetWindow(dwgVideo) + $hPlayer.Play + HidePause + +End + +Public Sub btnPause_Click() + + If Not $hPlayer Then Return + $hPlayer.Pause + ShowPause + timTime.Stop + +End + +Public Sub btnStop_Click() + + If Not $hPlayer Then Return + $hPlayer.Stop + HidePause + timTime.Stop + $fLength = 0 + +End + +Public Sub dwgVideo_Arrange() + + Dim W, H As Integer + + H = Desktop.Scale * 8 + W = H * 2 + + 'lblTime.Move(dwgVideo.W - W, dwgVideo.H - H, W, H) + + If $hPause1 Then $hPause1.Move(dwgVideo.W \ 2 - 32, dwgVideo.H \ 2 - 32, 24, 64) + If $hPause2 Then $hPause2.Move(dwgVideo.W \ 2 + 8, dwgVideo.H \ 2 - 32, 24, 64) + +End + +Public Sub GetShowControl() As Boolean + + Return panControl.Visible + +End + +Public Sub SetShowControl(bShow As Boolean) + + panControl.Visible = bShow + dwgTime.Visible = bShow + +End + +Public Sub GetBorder() As Boolean + + Return panBorder.Border <> Border.None + +End + +Public Sub SetBorder(bBorder As Boolean) As Boolean + + If bBorder Then + panBorder.Border = Border.Plain + panBorder.Margin = True + Else + panBorder.Border = Border.None + panBorder.Margin = False + Endif + +End + +Private Sub UpdateTime() + + Dim fPos As Float + + fPos = $hPlayer.Position + If fPos = 0 Then Return + $fPos = fPos + If $fLength = 0 Then $fLength = $hPlayer.Duration + dwgTime.Refresh + +End + + +Public Sub timTime_Timer() + + UpdateTime + +End + +Public Sub dwgTime_Draw() + + Dim sText As String + + If Not $hPlayer Or If $hPlayer.State = Media.Null Then Return + + If $fLength > 0 Then Paint.FillRect(4, 6, (dwgTime.W - 8) * Min(1, $fPos / $fLength), dwgTime.H - 12, &HC0C0C0&) + + If $fPos = 0 Then + sText = "00:00:00" + Else + sText = Format(CDate(($fPos + 0.5) / 86400), "hh:nn:ss") '& " / " & Format(CDate($fLength / 86400), "hh:nn:ss") + Endif + Paint.DrawText(sText, 0, 0, dwgTime.W - 4, dwgTime.H, Align.Right) + +End + +Private Sub SetPos(fPos As Float) + + If $hPlayer.State = Media.Paused Or If $hPlayer.State = Media.Playing Then + If $fLength Then + $fPos = fPos * $fLength + $hPlayer.Position = $fPos + dwgTime.Refresh + Endif + Endif + +End + + +Public Sub dwgTime_MouseDown() + + If Mouse.Left Then SetPos(Mouse.X / dwgTime.W) + +End + +Public Sub dwgTime_MouseMove() + + If Mouse.Left Then SetPos(Mouse.X / dwgTime.W) + +End + +Public Sub sldVolume_Change() + + sldVolume.Tooltip = CStr(sldVolume.Value) & "%" + If Not $hPlayer Then Return + $hPlayer.Audio.Volume = sldVolume.Value / 100 + +End + +Public Sub btnVolume_Click() + + If sldVolume.Enabled Then + $iMute = sldVolume.Value + sldVolume.Value = 0 + Else + sldVolume.Value = $iMute + Endif + sldVolume.Enabled = Not sldVolume.Enabled + +End diff --git a/comp/src/gb.media.form/.src/FMediaPlayer.form b/comp/src/gb.media.form/.src/FMediaPlayer.form new file mode 100644 index 000000000..e5fa2c8a7 --- /dev/null +++ b/comp/src/gb.media.form/.src/FMediaPlayer.form @@ -0,0 +1,57 @@ +# Gambas Form File 3.0 + +{ Form Form + MoveScaled(0,0,64,64) + Arrangement = Arrange.Fill + { panBorder Panel + MoveScaled(2,3,58,55) + Arrangement = Arrange.Vertical + { panViewer Panel + MoveScaled(11,2,43,30) + Background = &H000000& + Expand = True + Arrangement = Arrange.Fill + { dwgVideo DrawingArea + MoveScaled(0,0,24,24) + Background = &H000000& + Expand = True + } + } + { dwgTime DrawingArea + MoveScaled(9,37,36,3) + Mouse = Mouse.Pointing + } + { panControl HBox + MoveScaled(0,45,57,4) + { btnPlay ToolButton + MoveScaled(0,0,4,4) + Picture = Picture["icon:/small/play"] + } + { btnPause ToolButton + MoveScaled(4,0,4,4) + Picture = Picture["icon:/small/pause"] + } + { btnStop ToolButton + MoveScaled(8,0,4,4) + Picture = Picture["icon:/small/stop"] + } + { Panel1 Panel + MoveScaled(13,0,3,4) + Expand = True + } + { btnVolume ToolButton + MoveScaled(26,0,4,4) + Picture = Picture["icon:/small/volume"] + } + { sldVolume Slider + MoveScaled(32,0,20,4) + ToolTip = ("100%") + Value = 100 + } + } + } + { timTime #Timer + #MoveScaled(3,11) + Delay = 250 + } +} diff --git a/comp/src/gb.media.form/.src/FTest.class b/comp/src/gb.media.form/.src/FTest.class new file mode 100644 index 000000000..0a5fa73ac --- /dev/null +++ b/comp/src/gb.media.form/.src/FTest.class @@ -0,0 +1,2 @@ +' Gambas class file + diff --git a/comp/src/gb.media.form/.src/FTest.form b/comp/src/gb.media.form/.src/FTest.form new file mode 100644 index 000000000..98b545e7f --- /dev/null +++ b/comp/src/gb.media.form/.src/FTest.form @@ -0,0 +1,10 @@ +# Gambas Form File 3.0 + +{ Form Form + MoveScaled(0,0,79,64) + Arrangement = Arrange.Fill + { MediaView1 MediaView + MoveScaled(4,5,66,40) + URL = "/media/benoit/Sauvegarde/Les Labos/crap2.mp4" + } +} diff --git a/comp/src/gb.media.form/.src/MediaView.class b/comp/src/gb.media.form/.src/MediaView.class new file mode 100644 index 000000000..a37908b40 --- /dev/null +++ b/comp/src/gb.media.form/.src/MediaView.class @@ -0,0 +1,60 @@ +' Gambas class file + +Export + +Inherits UserControl + +Public Const _IsControl As Boolean = True +Public Const _Group As String = "Media" +Public Const _Properties As String = "*,Border,Control=True,URL{Path}" + +Property URL As String +Property Border As Boolean +Property Control As Boolean + +Private $hView As FMediaPlayer +Private $sUrl As String + +Public Sub _new() + + $hView = New FMediaPlayer(Me) + +End + +Private Function URL_Read() As String + + Return $sUrl + +End + +Private Sub URL_Write(Value As String) + + $sUrl = Value + If Me.Design Then Return + $hView.SetUrl($sUrl) + +End + +Private Function Control_Read() As Boolean + + Return $hView.GetShowControl() + +End + +Private Sub Control_Write(Value As Boolean) + + $hView.SetShowControl(Value) + +End + +Private Function Border_Read() As Boolean + + Return $hView.GetBorder() + +End + +Private Sub Border_Write(Value As Boolean) + + $hView.SetBorder(Value) + +End diff --git a/comp/src/gb.media.form/.startup b/comp/src/gb.media.form/.startup new file mode 100644 index 000000000..86cddad0d --- /dev/null +++ b/comp/src/gb.media.form/.startup @@ -0,0 +1,11 @@ +FTest +gb.media.form +0 +0 +3.5.90 + +gb.image +gb.gui +gb.form +gb.media + diff --git a/comp/src/gb.media.form/video.png b/comp/src/gb.media.form/video.png new file mode 100644 index 000000000..cbd7c5cbf Binary files /dev/null and b/comp/src/gb.media.form/video.png differ diff --git a/comp/src/gb.net.pop3/.hidden/control/pop3client.png b/comp/src/gb.net.pop3/.hidden/control/pop3client.png new file mode 100644 index 000000000..636010e70 Binary files /dev/null and b/comp/src/gb.net.pop3/.hidden/control/pop3client.png differ diff --git a/comp/src/gb.net.pop3/.info b/comp/src/gb.net.pop3/.info index ad06ede0d..9dff33fe1 100644 --- a/comp/src/gb.net.pop3/.info +++ b/comp/src/gb.net.pop3/.info @@ -27,7 +27,7 @@ Network _Properties C s -Host,Port,Debug,Encrypt{Net.None;SSL} +Host,Port,User,Password,Encrypt{Net.None;SSL},Debug Encrypt p i diff --git a/comp/src/gb.net.pop3/.src/Pop3Client.class b/comp/src/gb.net.pop3/.src/Pop3Client.class index fcfc994d7..59770f57f 100644 --- a/comp/src/gb.net.pop3/.src/Pop3Client.class +++ b/comp/src/gb.net.pop3/.src/Pop3Client.class @@ -36,7 +36,7 @@ Export Public Const _IsControl As Boolean = True Public Const _IsVirtual As Boolean = True Public Const _Group As String = "Network" -Public Const _Properties As String = "Host,Port,Debug,Encrypt{Net.None;SSL}" +Public Const _Properties As String = "Host,Port,User,Password,Encrypt{Net.None;SSL},Debug" Private Const SERVER_POSITIVE_RESPONSE As String = "+OK" Private Const SERVER_NEGATIVE_RESPONSE As String = "-ERR" diff --git a/comp/src/gb.net.smtp/.component b/comp/src/gb.net.smtp/.component index ecf12a5d6..dc179f38e 100644 --- a/comp/src/gb.net.smtp/.component +++ b/comp/src/gb.net.smtp/.component @@ -1,4 +1,4 @@ [Component] Key=gb.net.smtp -Version=0.0.4 +Version=3.5.90 Requires=gb.net diff --git a/app/src/gambas3/img/control/smtpclient.png b/comp/src/gb.net.smtp/.hidden/control/smtpclient.png similarity index 100% rename from app/src/gambas3/img/control/smtpclient.png rename to comp/src/gb.net.smtp/.hidden/control/smtpclient.png diff --git a/comp/src/gb.net.smtp/.info b/comp/src/gb.net.smtp/.info index 4362a27bb..83143451b 100644 --- a/comp/src/gb.net.smtp/.info +++ b/comp/src/gb.net.smtp/.info @@ -16,6 +16,22 @@ i #SmtpClient C +_IsControl +C +b +-1 +_IsVirtual +C +b +-1 +_Group +C +s +Network +_Properties +C +s +Host,Port,User,Password,Encrypt{Net.None;SSL;TLS}=None Debug p b diff --git a/comp/src/gb.net.smtp/.project b/comp/src/gb.net.smtp/.project index 414811bc0..3ac8b1e00 100644 --- a/comp/src/gb.net.smtp/.project +++ b/comp/src/gb.net.smtp/.project @@ -2,7 +2,8 @@ # Compiled with Gambas 3.5.90 Title=gb.net.smtp Startup=Main -Version=0.0.9 +Version=3.5.90 +VersionFile=1 Component=gb.net TabSize=2 Type=Component diff --git a/comp/src/gb.net.smtp/.src/SmtpClient.class b/comp/src/gb.net.smtp/.src/SmtpClient.class index bcbad540f..14bdb6e9b 100644 --- a/comp/src/gb.net.smtp/.src/SmtpClient.class +++ b/comp/src/gb.net.smtp/.src/SmtpClient.class @@ -5,6 +5,11 @@ Export Static Private $aDay As String[] Static Private $aMonth As String[] +Public Const _IsControl As Boolean = True +Public Const _IsVirtual As Boolean = True +Public Const _Group As String = "Network" +Public Const _Properties As String = "Host,Port,User,Password,Encrypt{Net.None;SSL;TLS}=None" + Property Debug As Boolean Property Host As String diff --git a/comp/src/gb.net.smtp/.startup b/comp/src/gb.net.smtp/.startup index cc045b3d1..ef347a0eb 100644 --- a/comp/src/gb.net.smtp/.startup +++ b/comp/src/gb.net.smtp/.startup @@ -2,7 +2,7 @@ Main gb.net.smtp 0 0 -0.0.9 +3.5.90 gb.net diff --git a/comp/src/order b/comp/src/order index 8fa8d3eaf..dfe07cf3c 100644 --- a/comp/src/order +++ b/comp/src/order @@ -1 +1 @@ -gb.eval.highlight gb.args gb.settings gb.gui.base gb.form gb.form.stock gb.form.dialog gb.form.mdi gb.db.form gb.desktop gb.web gb.report gb.chart gb.mysql gb.net.smtp gb.net.pop3 gb.memcached gb.map gb.logging gb.markdown +gb.eval.highlight gb.args gb.settings gb.gui.base gb.form gb.form.stock gb.form.dialog gb.form.mdi gb.db.form gb.desktop gb.web gb.report gb.chart gb.mysql gb.net.smtp gb.net.pop3 gb.memcached gb.map gb.logging gb.markdown gb.media.form diff --git a/examples/examples/Multimedia/MediaPlayer/.src/FMain.form b/examples/examples/Multimedia/MediaPlayer/.src/FMain.form index f76419056..401369b33 100644 --- a/examples/examples/Multimedia/MediaPlayer/.src/FMain.form +++ b/examples/examples/Multimedia/MediaPlayer/.src/FMain.form @@ -3,11 +3,10 @@ { Form Form MoveScaled(0,0,110,85) Icon = Picture["icon.png"] - Border = False Maximized = True Arrangement = Arrange.Vertical { dwgVideo DrawingArea - MoveScaled(11,25,24,24) + MoveScaled(12,27,24,24) Background = &H000000& Expand = True } diff --git a/gb.media/src/c_media.c b/gb.media/src/c_media.c index 758f654fc..1076f921b 100644 --- a/gb.media/src/c_media.c +++ b/gb.media/src/c_media.c @@ -1617,12 +1617,12 @@ BEGIN_PROPERTY(MediaPipeline_Position) } else { - guint64 pos = VPROP(GB_FLOAT) * 1E9; + gint64 pos = VPROP(GB_FLOAT) * 1E9; if (pos < 0) pos = 0; - - gst_element_seek_simple(ELEMENT, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT, pos); + + gst_element_seek_simple(ELEMENT, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT, (guint64)pos); } END_PROPERTY diff --git a/main/gbx/gbx_stream.c b/main/gbx/gbx_stream.c index 5b0e08ed3..f18d6b2e2 100644 --- a/main/gbx/gbx_stream.c +++ b/main/gbx/gbx_stream.c @@ -721,13 +721,10 @@ static char *input(STREAM *stream, bool line, char *escape) } if (len > 0) - //add_string(addr, &len_str, stream->common.buffer + start, len); addr = STRING_add(addr, buffer + start, len); else if (len < 0) addr = STRING_extend(addr, STRING_length(addr) + len); - //STRING_extend_end(addr); - stream->common.buffer = buffer; stream->common.buffer_pos = buffer_pos; stream->common.buffer_len = buffer_len;