]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixes and source cleaning for WinCE.
authorWłodzimierz Skiba <abx@abx.art.pl>
Wed, 8 Sep 2004 06:41:06 +0000 (06:41 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Wed, 8 Sep 2004 06:41:06 +0000 (06:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/wince/helpwce.h
include/wx/msw/wince/libraries.h
include/wx/msw/wince/net.h
include/wx/msw/wince/textctrlce.h
src/msw/wince/choicece.cpp
src/msw/wince/filedlgwce.cpp
src/msw/wince/helpwce.cpp
src/msw/wince/menuce.cpp
src/msw/wince/net.cpp
src/msw/wince/tbarwce.cpp
src/msw/wince/textctrlce.cpp

index 82e29f1a95ad6b86eda82934a6f41db82d023288..6540fdce66bf0d027913a5139c8c292af73317b6 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     2003-07-12
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_HELPWCE_H_
index 67bca56aea2683deb5247c8292d6f16a2914084c..b03e41a9ba6d20dae4b030389a9ba74835fc7990 100644 (file)
@@ -12,8 +12,8 @@
 #ifndef _WX_LIBRARIES_H_
 #define _WX_LIBRARIES_H_
 
-// NB: According to Microsoft, it is up to the OEM to decide whether 
-//     some of libraries will be included in the system or not. For example, 
+// NB: According to Microsoft, it is up to the OEM to decide whether
+//     some of libraries will be included in the system or not. For example,
 //     MS' STANDARDSDK does not include cyshell.lib and aygshell.lib, while
 //     Pocket PC 2003 SDK does. We depend on some symbols that are in these
 //     libraries in some SDKs and in different libs in others. Fortunately we
index 7476d80463ae87655c7602daf06a130603daa75f..f99209bd556f5ae9a9e1d0211d918232b5c46bd8 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright 1998, Ben Goetter.  All rights reserved.
 
 /*
- patch holes in winsock 
+ patch holes in winsock
 
   WCE 2.0 lacks many of the 'database' winsock routines.
   Stub just enough them for ss.dll.
index ad2f72a392729f24c7176ce51804a78be1be5aa0..68741c84c4069fdec035d75c37df4a120bbac202 100644 (file)
@@ -193,10 +193,10 @@ protected:
 
     // replace the contents of the selection or of the entire control with the
     // given text
-    void DoWriteText(const wxString& text, bool selectionOnly = TRUE);
+    void DoWriteText(const wxString& text, bool selectionOnly = true);
 
     // set the selection possibly without scrolling the caret into view
-    void DoSetSelection(long from, long to, bool scrollCaret = TRUE);
+    void DoSetSelection(long from, long to, bool scrollCaret = true);
 
     // return true if there is a non empty selection in the control
     bool HasSelection() const;
@@ -205,7 +205,7 @@ protected:
     // position
     long GetLengthOfLineContainingPos(long pos) const;
 
-    // send TEXT_UPDATED event, return TRUE if it was handled, FALSE otherwise
+    // send TEXT_UPDATED event, return true if it was handled, false otherwise
     bool SendUpdateEvent();
 
     // override some base class virtuals
@@ -214,7 +214,7 @@ protected:
 
     virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
 
-    // if TRUE, SendUpdateEvent() will eat the next event (see comments in the
+    // if true, SendUpdateEvent() will eat the next event (see comments in the
     // code as to why this is needed)
     bool m_suppressNextUpdate;
 
index 5f46de450bd5f588c0f4a870b2e713ac28be175a..59971875c4f41e92a81e9ce93a69ea0669425fbe 100644 (file)
@@ -151,8 +151,6 @@ bool wxChoice::CreateAndInit(wxWindow *parent,
     wxSize sizeText(size), sizeBtn(size);
     sizeBtn.x = GetBestSpinerSize(IsVertical(style)).x;
 
-    sizeBtn.x;
-
     if ( sizeText.x == wxDefaultCoord )
     {
         // DEFAULT_ITEM_WIDTH is the default width for the text control
@@ -300,7 +298,7 @@ wxChoice::~wxChoice()
 
 int wxChoice::DoAppend(const wxString& item)
 {
-    int n = (int)SendMessage(GetBuddyHwnd(), LB_ADDSTRING, 0, (LPARAM)item.c_str());
+    int n = (int)::SendMessage(GetBuddyHwnd(), LB_ADDSTRING, 0, (LPARAM)item.c_str());
 
     if ( n == LB_ERR )
     {
@@ -315,7 +313,7 @@ int wxChoice::DoInsert(const wxString& item, int pos)
     wxCHECK_MSG(!(GetWindowStyle() & wxCB_SORT), -1, wxT("can't insert into choice"));
     wxCHECK_MSG((pos>=0) && (pos<=GetCount()), -1, wxT("invalid index"));
 
-    int n = (int)SendMessage(GetBuddyHwnd(), LB_INSERTSTRING, pos, (LPARAM)item.c_str());
+    int n = (int)::SendMessage(GetBuddyHwnd(), LB_INSERTSTRING, pos, (LPARAM)item.c_str());
     if ( n == LB_ERR )
     {
         wxLogLastError(wxT("SendMessage(LB_INSERTSTRING)"));
@@ -333,14 +331,14 @@ void wxChoice::Delete(int n)
         delete GetClientObject(n);
     }
 
-    SendMessage(GetBuddyHwnd(), LB_DELETESTRING, n, 0);
+    ::SendMessage(GetBuddyHwnd(), LB_DELETESTRING, n, 0);
 }
 
 void wxChoice::Clear()
 {
     Free();
 
-    SendMessage(GetBuddyHwnd(), LB_RESETCONTENT, 0, 0);
+    ::SendMessage(GetBuddyHwnd(), LB_RESETCONTENT, 0, 0);
 }
 
 void wxChoice::Free()
@@ -361,12 +359,12 @@ void wxChoice::Free()
 
 int wxChoice::GetSelection() const
 {
-    return (int)SendMessage(GetBuddyHwnd(), LB_GETCURSEL, 0, 0);
+    return (int)::SendMessage(GetBuddyHwnd(), LB_GETCURSEL, 0, 0);
 }
 
 void wxChoice::SetSelection(int n)
 {
-    SendMessage(GetBuddyHwnd(), LB_SETCURSEL, n, 0);
+    ::SendMessage(GetBuddyHwnd(), LB_SETCURSEL, n, 0);
 }
 
 // ----------------------------------------------------------------------------
@@ -375,12 +373,12 @@ void wxChoice::SetSelection(int n)
 
 int wxChoice::GetCount() const
 {
-    return (int)SendMessage(GetBuddyHwnd(), LB_GETCOUNT, 0, 0);
+    return (int)::SendMessage(GetBuddyHwnd(), LB_GETCOUNT, 0, 0);
 }
 
 int wxChoice::FindString(const wxString& s) const
 {
-    int pos = (int)SendMessage(GetBuddyHwnd(), LB_FINDSTRINGEXACT,
+    int pos = (int)::SendMessage(GetBuddyHwnd(), LB_FINDSTRINGEXACT,
                                (WPARAM)-1, (LPARAM)s.c_str());
 
     return pos == LB_ERR ? wxNOT_FOUND : pos;
@@ -452,7 +450,7 @@ void wxChoice::DoSetItemClientData( int n, void* clientData )
 
 void* wxChoice::DoGetItemClientData( int n ) const
 {
-    LPARAM rc = SendMessage(GetHwnd(), LB_GETITEMDATA, n, 0);
+    LPARAM rc = ::SendMessage(GetHwnd(), LB_GETITEMDATA, n, 0);
     if ( rc == LB_ERR )
     {
         wxLogLastError(wxT("LB_GETITEMDATA"));
index bb0a24773b6004943f198c90c2c639d8750dd436..ac530e7158ff7f3803903de69040d11a47c5a451 100644 (file)
@@ -116,7 +116,7 @@ int wxFileDialog::ShowModal()
     wxWindow* parentWindow = GetParent();
     if (!parentWindow)
         parentWindow = wxTheApp->GetTopWindow();
-    
+
     wxString str = wxGetTextFromUser(m_message, _("File"), m_fileName, parentWindow);
     if (str)
     {
index 1e6a0b19a83dd55412676eb1c207cf708ed3744e..0196bb69075308c91848e411e549f3644855ad5a 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     2003-07-12
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
@@ -87,7 +87,7 @@ bool wxWinceHelpController::KeywordSearch(const wxString& WXUNUSED(k),
 
 bool wxWinceHelpController::Quit()
 {
-    return TRUE;
+    return true;
 }
 
 // Append extension if necessary.
@@ -109,8 +109,8 @@ wxString wxWinceHelpController::GetValidFilename(const wxString& file) const
 // View URL
 bool wxWinceHelpController::ViewURL(const wxString& topic)
 {
-    if (m_helpFile.IsEmpty()) return FALSE;
-    
+    if (m_helpFile.IsEmpty()) return false;
+
     wxString url( wxT("file:") + GetValidFilename(m_helpFile) );
     if (!topic.IsEmpty())
         url = url + wxT("#") + topic;
index c9905e452f8c48f89c5459592e4b88ccde0b9f80..10c97cd142c1f4e3d5506ac806425425e9b41c0f 100644 (file)
@@ -87,41 +87,41 @@ void wxTopLevelWindowMSW::ButtonMenu::SetButton(int id, const wxString& label, w
 
 wxMenu *wxTopLevelWindowMSW::ButtonMenu::DuplicateMenu(wxMenu *menu)
 {
-       // This is required in case of converting wxMenuBar to wxMenu in wxFrame::SetMenuBar.
-       // All submenus has to be recreated because of new owner.
+    // This is required in case of converting wxMenuBar to wxMenu in wxFrame::SetMenuBar.
+    // All submenus has to be recreated because of new owner.
 
-       wxMenu *duplication = new wxMenu;
+    wxMenu *duplication = new wxMenu;
 
-       if (menu)
-       {
+    if (menu)
+    {
         wxMenuItemList::compatibility_iterator node = menu->GetMenuItems().GetFirst();
         while (node)
-               {
-                       wxMenuItem *item = node->GetData();
-                       if (item)
-                       {
-                               wxMenu *submenu = NULL;
+        {
+            wxMenuItem *item = node->GetData();
+            if (item)
+            {
+                wxMenu *submenu = NULL;
 
-                               if(item->IsSubMenu())
-                                   submenu = DuplicateMenu( item->GetSubMenu() );
-                               else
-                                       submenu = NULL;
+                if(item->IsSubMenu())
+                    submenu = DuplicateMenu( item->GetSubMenu() );
+                else
+                    submenu = NULL;
 
-                               wxMenuItem *new_item = wxMenuItem::New(duplication, item->GetId(), item->GetLabel(), item->GetHelp(), item->GetKind(), submenu);
+                wxMenuItem *new_item = wxMenuItem::New(duplication, item->GetId(), item->GetLabel(), item->GetHelp(), item->GetKind(), submenu);
 
-                               if( item->IsCheckable() )
-                                   new_item->Check(item->IsChecked());
+                if( item->IsCheckable() )
+                    new_item->Check(item->IsChecked());
 
-                               new_item->Enable( item->IsEnabled() );
+                new_item->Enable( item->IsEnabled() );
 
-                               duplication->Append(new_item);
-                       }
+                duplication->Append(new_item);
+            }
             node = node->GetNext();
-               }
-               
-       }
+        }
+
+    }
 
-       return duplication;
+    return duplication;
 }
 
 void wxMenuToHMenu(wxMenu* in, HMENU hMenu)
@@ -189,11 +189,11 @@ void wxTopLevelWindowMSW::ReloadButton(ButtonMenu& button, UINT menuID)
     button_info.fsState = TBSTATE_ENABLED;
     wxStrcpy(buf, button.GetLabel().c_str());
     button_info.pszText = buf;
-    SendMessage(m_MenuBarHWND, TB_SETBUTTONINFO, menuID, (LPARAM) &button_info);
+    ::SendMessage(m_MenuBarHWND, TB_SETBUTTONINFO, menuID, (LPARAM) &button_info);
 
     if(button.IsMenu())
     {
-        HMENU hPopupMenu = (HMENU) SendMessage(m_MenuBarHWND, SHCMBM_GETSUBMENU, 0, menuID);
+        HMENU hPopupMenu = (HMENU) ::SendMessage(m_MenuBarHWND, SHCMBM_GETSUBMENU, 0, menuID);
         RemoveMenu(hPopupMenu, 0, MF_BYPOSITION);
         wxMenuToHMenu(button.GetMenu(), hPopupMenu);
     }
index b83753f82c64229ec23bff4d366009e7a28485b2..fc8c9eef1ea9b3376a619b70ab19dc37b345a0b7 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright 1998, Ben Goetter.  All rights reserved.
 
 /*
- patch holes in winsock 
+ patch holes in winsock
 
   WCE 2.0 lacks many of the 'database' winsock routines.
   Stub just enough them for ss.dll.
@@ -47,7 +47,7 @@ static struct protoent RgProtoEnt[] =
 // Ordered by most likely to be requested.
 // Assumes that a service available on different protocols
 // will use the same port number on each protocol.
-// Should that be no longer the case, 
+// Should that be no longer the case,
 // remove the fFoundOnce code from getservbyXxx fcns.
 
 // This table keeps port numbers in host byte order.
index 4cb447f393aff7146a7a0dced896ef1ad948eacb..2138b8ef6a868758e3ff4c46e2d5bee9e22a089e 100644 (file)
@@ -236,7 +236,7 @@ bool wxToolBar::Create(wxWindow *parent,
     SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_MENUBAR));
     SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
 
-    return TRUE;
+    return true;
 }
 
 #ifndef TBSTYLE_NO_DROPDOWN_ARROW
@@ -252,7 +252,7 @@ bool wxToolBar::MSWCreateToolbar(const wxPoint& WXUNUSED(pos), const wxSize& WXU
 #if defined(WINCE_WITHOUT_COMMANDBAR)
     // Create the menubar.
     SHMENUBARINFO mbi;
-    
+
     memset (&mbi, 0, sizeof (SHMENUBARINFO));
     mbi.cbSize     = sizeof (SHMENUBARINFO);
     mbi.hwndParent = (HWND) GetParent()->GetHWND();
@@ -265,13 +265,13 @@ bool wxToolBar::MSWCreateToolbar(const wxPoint& WXUNUSED(pos), const wxSize& WXU
     mbi.cBmpImages = 0;
     mbi.dwFlags = 0 ; // SHCMBF_EMPTYBAR;
     mbi.hInstRes = wxGetInstance();
-    
+
     if (!SHCreateMenuBar(&mbi))
     {
         wxFAIL_MSG( _T("SHCreateMenuBar failed") );
         return false;
     }
-    
+
     SetHWND((WXHWND) mbi.hwndMB);
 #else
     HWND hWnd = CommandBar_Create(wxGetInstance(), (HWND) GetParent()->GetHWND(), GetId());
@@ -283,8 +283,8 @@ bool wxToolBar::MSWCreateToolbar(const wxPoint& WXUNUSED(pos), const wxSize& WXU
 
     if (menuBar)
         menuBar->Create();
-    
-    return TRUE;
+
+    return true;
 }
 
 void wxToolBar::Recreate()
@@ -437,7 +437,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *tool)
     // Realize() later
     tool->Attach(this);
 
-    return TRUE;
+    return true;
 }
 
 bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool)
@@ -510,11 +510,11 @@ bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool)
             int x;
             wxControl *control = tool2->GetControl();
             control->GetPosition(&x, NULL);
-            control->Move(x - width, -1);
+            control->Move(x - width, wxDefaultCoord);
         }
     }
 
-    return TRUE;
+    return true;
 }
 
 struct wxToolBarIdMapping
@@ -554,7 +554,7 @@ static wxToolBarIdMapping sm_ToolBarIdMappingArray[] =
 static int wxFindIdForwxWinId(int id)
 {
     int i = 0;
-    while (TRUE)
+    while (true)
     {
         if (sm_ToolBarIdMappingArray[i].m_wxwinId == 0)
             return -1;
@@ -572,7 +572,7 @@ bool wxToolBar::Realize()
     if ( nTools == 0 )
     {
         // nothing to do
-        return TRUE;
+        return true;
     }
 
 #if 0
@@ -605,7 +605,7 @@ bool wxToolBar::Realize()
     {
         wxToolBarToolBase *tool = node->GetData();
 
-        bool processedThis = TRUE;
+        bool processedThis = true;
 
         TBBUTTON& button = buttons[i];
 
@@ -663,10 +663,10 @@ bool wxToolBar::Realize()
                             // radio items
                             button.fsState |= TBSTATE_CHECKED;
 
-                            tool->Toggle(TRUE);
+                            tool->Toggle(true);
                         }
 
-                        isRadio = TRUE;
+                        isRadio = true;
                         break;
 
                     case wxITEM_CHECK:
@@ -723,8 +723,8 @@ bool wxToolBar::Realize()
         // note that we use TB_GETITEMRECT and not TB_GETRECT because the
         // latter only appeared in v4.70 of comctl32.dll
         RECT r;
-        if ( !SendMessage(GetHwnd(), TB_GETITEMRECT,
-                          index, (LPARAM)(LPRECT)&r) )
+        if ( !::SendMessage(GetHwnd(), TB_GETITEMRECT,
+                            index, (LPARAM)(LPRECT)&r) )
         {
             wxLogLastError(wxT("TB_GETITEMRECT"));
         }
@@ -756,8 +756,8 @@ bool wxToolBar::Realize()
             tbbi.cbSize = sizeof(tbbi);
             tbbi.dwMask = TBIF_SIZE;
             tbbi.cx = size.x;
-            if ( !SendMessage(GetHwnd(), TB_SETBUTTONINFO,
-                              tool->GetId(), (LPARAM)&tbbi) )
+            if ( !::SendMessage(GetHwnd(), TB_SETBUTTONINFO,
+                                tool->GetId(), (LPARAM)&tbbi) )
             {
                 // the id is probably invalid?
                 wxLogLastError(wxT("TB_SETBUTTONINFO"));
@@ -780,8 +780,8 @@ bool wxToolBar::Realize()
             size_t nSeparators = size.x / widthSep;
             for ( size_t nSep = 0; nSep < nSeparators; nSep++ )
             {
-                if ( !SendMessage(GetHwnd(), TB_INSERTBUTTON,
-                                  index, (LPARAM)&tbb) )
+                if ( !::SendMessage(GetHwnd(), TB_INSERTBUTTON,
+                                    index, (LPARAM)&tbb) )
                 {
                     wxLogLastError(wxT("TB_INSERTBUTTON"));
                 }
@@ -794,7 +794,7 @@ bool wxToolBar::Realize()
             ((wxToolBarTool *)tool)->SetSeparatorsCount(nSeparators);
 
             // adjust the controls width to exactly cover the separators
-            control->SetSize((nSeparators + 1)*widthSep, -1);
+            control->SetSize((nSeparators + 1)*widthSep, wxDefaultCoord);
         }
 
         // position the control itself correctly vertically
@@ -803,7 +803,7 @@ bool wxToolBar::Realize()
         if ( diff < 0 )
         {
             // the control is too high, resize to fit
-            control->SetSize(-1, height - 2);
+            control->SetSize(wxDefaultCoord, height - 2);
 
             diff = 2;
         }
@@ -893,7 +893,7 @@ bool wxToolBar::MSWCommand(WXUINT WXUNUSED(cmd), WXWORD id)
         }
     }
 
-    return TRUE;
+    return true;
 }
 
 bool wxToolBar::MSWOnNotify(int WXUNUSED(idCtrl),
@@ -908,11 +908,11 @@ bool wxToolBar::MSWOnNotify(int WXUNUSED(idCtrl),
     // in an ANSI application - this seems to be a bug in comctl32.dll v5
     UINT code = hdr->code;
     if ( (code != (UINT) TTN_NEEDTEXTA) && (code != (UINT) TTN_NEEDTEXTW) )
-        return FALSE;
+        return false;
 
     HWND toolTipWnd = (HWND)::SendMessage((HWND)GetHWND(), TB_GETTOOLTIPS, 0, 0);
     if ( toolTipWnd != hdr->hwndFrom )
-        return FALSE;
+        return false;
 
     LPTOOLTIPTEXT ttText = (LPTOOLTIPTEXT)lParam;
     int id = (int)ttText->hdr.idFrom;
@@ -1032,7 +1032,7 @@ wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord x, wxCoord y) const
 void wxToolBar::UpdateSize()
 {
     // the toolbar size changed
-    SendMessage(GetHwnd(), TB_AUTOSIZE, 0, 0);
+    ::SendMessage(GetHwnd(), TB_AUTOSIZE, 0, 0);
 
     // we must also refresh the frame after the toolbar size (possibly) changed
     wxFrame *frame = wxDynamicCast(GetParent(), wxFrame);
index 5fce03dcf1dcd99ef9d161e898de6e96d1d159c5..86f6c7d248f8fde208cb3b0c363287efbc1f8e5f 100644 (file)
@@ -232,7 +232,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
     WXDWORD spiner_style = WS_VISIBLE |
                            UDS_ALIGNRIGHT |
                            UDS_EXPANDABLE |
-                                                  UDS_NOSCROLL;
+                           UDS_NOSCROLL;
 
     if ( !IsVertical(style) )
         spiner_style |= UDS_HORZ;
@@ -409,7 +409,7 @@ void wxTextCtrl::SetValue(const wxString& value)
     if ( (value.length() > 0x400) || (value != GetValue()) )
     {
         DoWriteText(value, false);
-        
+
         // for compatibility, don't move the cursor when doing SetValue()
         SetInsertionPoint(0);
     }
@@ -546,7 +546,7 @@ bool wxTextCtrl::CanPaste() const
 
 void wxTextCtrl::SetEditable(bool editable)
 {
-    SendMessage(GetBuddyHwnd(), EM_SETREADONLY, (WPARAM)!editable, (LPARAM)0L);
+    ::SendMessage(GetBuddyHwnd(), EM_SETREADONLY, (WPARAM)!editable, (LPARAM)0L);
 }
 
 void wxTextCtrl::SetInsertionPoint(long pos)
@@ -740,9 +740,9 @@ wxTextCtrl::HitTest(const wxPoint& pt, long *posOut) const
     // double check that we really are where it pretends
     POINTL ptReal;
 
-    LRESULT lRc = SendMessage(GetBuddyHwnd(), EM_POSFROMCHAR, pos, 0);
+    LRESULT lRc = ::SendMessage(GetBuddyHwnd(), EM_POSFROMCHAR, pos, 0);
 
-       if ( lRc == -1 )
+    if ( lRc == -1 )
     {
         // this is apparently returned when pos corresponds to the last
         // position
@@ -779,7 +779,7 @@ void wxTextCtrl::ShowPosition(long pos)
     int linesToScroll = specifiedLineLineNo - currentLineLineNo;
 
     if (linesToScroll != 0)
-               (void)::SendMessage(GetBuddyHwnd(), EM_LINESCROLL, 0, (LPARAM)linesToScroll);
+        (void)::SendMessage(GetBuddyHwnd(), EM_LINESCROLL, 0, (LPARAM)linesToScroll);
 }
 
 long wxTextCtrl::GetLengthOfLineContainingPos(long pos) const