[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/core missing.cpp,1.1.2.5,1.1.2.6 pgapplic
From: |
Alexander Pipelka <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/core missing.cpp,1.1.2.5,1.1.2.6 pgapplication.cpp,1.2.4.16,1.2.4.17 pgfilearchive.cpp,1.2.4.11,1.2.4.12 pglog.cpp,1.1.6.7,1.1.6.8 |
Date: |
Sun, 30 Mar 2003 11:31:00 -0500 |
Update of /cvsroot/paragui/paragui/src/core
In directory subversions:/tmp/cvs-serv28134/src/core
Modified Files:
Tag: devel-1-0
missing.cpp pgapplication.cpp pgfilearchive.cpp pglog.cpp
Log Message:
- converted wrong CR/LF to LF (UNIX style)
- applied patches from "H. C." <address@hidden>
access functions for PG_Application::enableAppIdleCalls
added functions to set the windowtitle of the log-console
Index: missing.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/missing.cpp,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -r1.1.2.5 -r1.1.2.6
*** missing.cpp 21 Mar 2003 20:04:58 -0000 1.1.2.5
--- missing.cpp 30 Mar 2003 16:30:57 -0000 1.1.2.6
***************
*** 1,179 ****
! #include "paragui.h"
!
! #ifndef HAVE_STRDUP
! char *strdup(const char *s) {
! if(s == NULL) {
! return NULL;
! }
!
! int l = strlen(s) + 1;
! char *ret = (char *)malloc(l);
! if (ret) {
! strcpy(ret,s);
! }
! return ret;
! }
! #endif
!
! #ifndef HAVE_FNMATCH
! #include <errno.h>
!
! /* Match STRING against the filename pattern PATTERN, returning zero
! if it matches, FNM_NOMATCH if not. */
! int fnmatch (const char *pattern, const char *string, int flags) {
! register const char *p = pattern, *n = string;
! register char c;
!
! if ((flags & ~__FNM_FLAGS) != 0) {
! errno = EINVAL;
! return (-1);
! }
!
! while ((c = *p++) != '\0')
! {
! switch (c)
! {
! case '?':
! if (*n == '\0')
! return (FNM_NOMATCH);
! else if ((flags & FNM_PATHNAME) && *n == '/')
! return (FNM_NOMATCH);
! else if ((flags & FNM_PERIOD) && *n == '.' &&
! (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
! return (FNM_NOMATCH);
! break;
!
! case '\\':
! if (!(flags & FNM_NOESCAPE))
! c = *p++;
! if (*n != c)
! return (FNM_NOMATCH);
! break;
!
! case '*':
! if ((flags & FNM_PERIOD) && *n == '.' &&
! (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
! return (FNM_NOMATCH);
!
! for (c = *p++; c == '?' || c == '*'; c = *p++, ++n)
! if (((flags & FNM_PATHNAME) && *n == '/') ||
! (c == '?' && *n == '\0'))
! return (FNM_NOMATCH);
!
! if (c == '\0')
! return (0);
!
! {
! char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c;
! for (--p; *n != '\0'; ++n)
! if ((c == '[' || *n == c1) &&
! fnmatch (p, n, flags & ~FNM_PERIOD) == 0)
! return (0);
! return (FNM_NOMATCH);
! }
!
! case '[':
! {
! /* Nonzero if the sense of the character class is
! inverted. */
! register int nott;
!
! if (*n == '\0')
! return (FNM_NOMATCH);
!
! if ((flags & FNM_PERIOD) && *n == '.' &&
! (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
! return (FNM_NOMATCH);
!
! /* Make sure there is a closing `]'. If there isn't,
! the `[' is just a character to be matched. */
! {
! register const char *np;
!
! for (np = p; np && *np && *np != ']'; np++);
!
! if (np && !*np)
! {
! if (*n != '[')
! return (FNM_NOMATCH);
! goto next_char;
! }
! }
!
! nott = (*p == '!' || *p == '^');
! if (nott)
! ++p;
!
! c = *p++;
! while (1)
! {
! register char cstart = c, cend = c;
!
! if (!(flags & FNM_NOESCAPE) && c == '\\')
! cstart = cend = *p++;
!
! if (c == '\0')
! /* [ (unterminated) loses. */
! return (FNM_NOMATCH);
!
! c = *p++;
!
! if ((flags & FNM_PATHNAME) && c == '/')
! /* [/] can never match. */
! return (FNM_NOMATCH);
!
! if (c == '-' && *p != ']')
! {
! cend = *p++;
! if (!(flags & FNM_NOESCAPE) && cend == '\\')
! cend = *p++;
! if (cend == '\0')
! return (FNM_NOMATCH);
! c = *p++;
! }
!
! if (*n >= cstart && *n <= cend)
! goto matched;
!
! if (c == ']')
! break;
! }
! if (!nott)
! return (FNM_NOMATCH);
!
! next_char:
! break;
!
! matched:
! /* Skip the rest of the [...] that already matched. */
! while (c != ']')
! {
! if (c == '\0')
! /* [... (unterminated) loses. */
! return (FNM_NOMATCH);
!
! c = *p++;
! if (!(flags & FNM_NOESCAPE) && c == '\\')
! /* 1003.2d11 is unclear if this is right. %%% */
! ++p;
! }
! if (nott)
! return (FNM_NOMATCH);
! }
! break;
!
! default:
! if (c != *n)
! return (FNM_NOMATCH);
! }
!
! ++n;
! }
!
! if (*n == '\0')
! return (0);
!
! return (FNM_NOMATCH);
! }
! #endif
!
--- 1,179 ----
! #include "paragui.h"
!
! #ifndef HAVE_STRDUP
! char *strdup(const char *s) {
! if(s == NULL) {
! return NULL;
! }
!
! int l = strlen(s) + 1;
! char *ret = (char *)malloc(l);
! if (ret) {
! strcpy(ret,s);
! }
! return ret;
! }
! #endif
!
! #ifndef HAVE_FNMATCH
! #include <errno.h>
!
! /* Match STRING against the filename pattern PATTERN, returning zero
! if it matches, FNM_NOMATCH if not. */
! int fnmatch (const char *pattern, const char *string, int flags) {
! register const char *p = pattern, *n = string;
! register char c;
!
! if ((flags & ~__FNM_FLAGS) != 0) {
! errno = EINVAL;
! return (-1);
! }
!
! while ((c = *p++) != '\0')
! {
! switch (c)
! {
! case '?':
! if (*n == '\0')
! return (FNM_NOMATCH);
! else if ((flags & FNM_PATHNAME) && *n == '/')
! return (FNM_NOMATCH);
! else if ((flags & FNM_PERIOD) && *n == '.' &&
! (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
! return (FNM_NOMATCH);
! break;
!
! case '\\':
! if (!(flags & FNM_NOESCAPE))
! c = *p++;
! if (*n != c)
! return (FNM_NOMATCH);
! break;
!
! case '*':
! if ((flags & FNM_PERIOD) && *n == '.' &&
! (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
! return (FNM_NOMATCH);
!
! for (c = *p++; c == '?' || c == '*'; c = *p++, ++n)
! if (((flags & FNM_PATHNAME) && *n == '/') ||
! (c == '?' && *n == '\0'))
! return (FNM_NOMATCH);
!
! if (c == '\0')
! return (0);
!
! {
! char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c;
! for (--p; *n != '\0'; ++n)
! if ((c == '[' || *n == c1) &&
! fnmatch (p, n, flags & ~FNM_PERIOD) == 0)
! return (0);
! return (FNM_NOMATCH);
! }
!
! case '[':
! {
! /* Nonzero if the sense of the character class is
! inverted. */
! register int nott;
!
! if (*n == '\0')
! return (FNM_NOMATCH);
!
! if ((flags & FNM_PERIOD) && *n == '.' &&
! (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
! return (FNM_NOMATCH);
!
! /* Make sure there is a closing `]'. If there isn't,
! the `[' is just a character to be matched. */
! {
! register const char *np;
!
! for (np = p; np && *np && *np != ']'; np++);
!
! if (np && !*np)
! {
! if (*n != '[')
! return (FNM_NOMATCH);
! goto next_char;
! }
! }
!
! nott = (*p == '!' || *p == '^');
! if (nott)
! ++p;
!
! c = *p++;
! while (1)
! {
! register char cstart = c, cend = c;
!
! if (!(flags & FNM_NOESCAPE) && c == '\\')
! cstart = cend = *p++;
!
! if (c == '\0')
! /* [ (unterminated) loses. */
! return (FNM_NOMATCH);
!
! c = *p++;
!
! if ((flags & FNM_PATHNAME) && c == '/')
! /* [/] can never match. */
! return (FNM_NOMATCH);
!
! if (c == '-' && *p != ']')
! {
! cend = *p++;
! if (!(flags & FNM_NOESCAPE) && cend == '\\')
! cend = *p++;
! if (cend == '\0')
! return (FNM_NOMATCH);
! c = *p++;
! }
!
! if (*n >= cstart && *n <= cend)
! goto matched;
!
! if (c == ']')
! break;
! }
! if (!nott)
! return (FNM_NOMATCH);
!
! next_char:
! break;
!
! matched:
! /* Skip the rest of the [...] that already matched. */
! while (c != ']')
! {
! if (c == '\0')
! /* [... (unterminated) loses. */
! return (FNM_NOMATCH);
!
! c = *p++;
! if (!(flags & FNM_NOESCAPE) && c == '\\')
! /* 1003.2d11 is unclear if this is right. %%% */
! ++p;
! }
! if (nott)
! return (FNM_NOMATCH);
! }
! break;
!
! default:
! if (c != *n)
! return (FNM_NOMATCH);
! }
!
! ++n;
! }
!
! if (*n == '\0')
! return (0);
!
! return (FNM_NOMATCH);
! }
! #endif
!
Index: pgapplication.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgapplication.cpp,v
retrieving revision 1.2.4.16
retrieving revision 1.2.4.17
diff -C2 -r1.2.4.16 -r1.2.4.17
*** pgapplication.cpp 21 Mar 2003 20:04:58 -0000 1.2.4.16
--- pgapplication.cpp 30 Mar 2003 16:30:57 -0000 1.2.4.17
***************
*** 1,967 ****
! /*
! ParaGUI - crossplatform widgetset
! Copyright (C) 2000,2001,2002 Alexander Pipelka
!
! This library is free software; you can redistribute it and/or
! modify it under the terms of the GNU Library General Public
! License as published by the Free Software Foundation; either
! version 2 of the License, or (at your option) any later version.
!
! This library is distributed in the hope that it will be useful,
[...1910 lines suppressed...]
! #endif
!
! void PG_Application::DisableDirtyUpdates(bool disable) {
! disableDirtyUpdates = disable;
! }
!
! bool PG_Application::GetDirtyUpdatesDisabled() {
! return disableDirtyUpdates;
! }
!
! PG_Application* PG_Application::GetApp() {
! return pGlobalApp;
! }
!
! /*
! * Local Variables:
! * c-basic-offset: 8
! * End:
! */
!
Index: pgfilearchive.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgfilearchive.cpp,v
retrieving revision 1.2.4.11
retrieving revision 1.2.4.12
diff -C2 -r1.2.4.11 -r1.2.4.12
*** pgfilearchive.cpp 4 Jan 2003 21:13:40 -0000 1.2.4.11
--- pgfilearchive.cpp 30 Mar 2003 16:30:57 -0000 1.2.4.12
***************
*** 310,317 ****
// add the loaded surface to the cache
! my_cache.AddSurface(fn, surface);
// return the pointer to the surface
! return surface;
}
--- 310,317 ----
// add the loaded surface to the cache
! return my_cache.AddSurface(fn, surface);
// return the pointer to the surface
! //return surface;
}
Index: pglog.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pglog.cpp,v
retrieving revision 1.1.6.7
retrieving revision 1.1.6.8
diff -C2 -r1.1.6.7 -r1.1.6.8
*** pglog.cpp 4 Jan 2003 21:13:40 -0000 1.1.6.7
--- pglog.cpp 30 Mar 2003 16:30:57 -0000 1.1.6.8
***************
*** 66,69 ****
--- 66,70 ----
static PG_Window* PG_LogWindow = NULL;
static PG_RichEdit* PG_LogWindowData = NULL;
+ static std::string my_title = "ParaGUI Log Console";
void PG_LogConsole::SetLogLevel(PG_LOG_LEVEL newlevel) {
***************
*** 179,183 ****
if (PG_LogWindow == NULL) {
PG_Rect r(25,100,PG_Application::GetScreenWidth()-50,300);
! PG_LogWindow = new PG_Window(NULL, r, "ParaGUI Log Console",
WF_SHOW_CLOSE, "Window", 25);
PG_LogWindowData = new PG_RichEdit(PG_LogWindow,
PG_Rect(1,26,r.w-2,r.h-27));
}
--- 180,184 ----
if (PG_LogWindow == NULL) {
PG_Rect r(25,100,PG_Application::GetScreenWidth()-50,300);
! PG_LogWindow = new PG_Window(NULL, r, my_title.c_str(),
WF_SHOW_CLOSE, "Window", 25);
PG_LogWindowData = new PG_RichEdit(PG_LogWindow,
PG_Rect(1,26,r.w-2,r.h-27));
}
***************
*** 216,219 ****
--- 217,228 ----
}
PG_LogWindowData->SetText(buffer);
+ }
+
+ void PG_LogConsole::SetTitle(const char* title, int alignment) {
+ my_title = title;
+
+ if (PG_LogWindow) {
+ PG_LogWindow->SetTitle(title, alignment);
+ }
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/core missing.cpp,1.1.2.5,1.1.2.6 pgapplication.cpp,1.2.4.16,1.2.4.17 pgfilearchive.cpp,1.2.4.11,1.2.4.12 pglog.cpp,1.1.6.7,1.1.6.8,
Alexander Pipelka <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/test/fireworks blob.cpp,1.1.2.1,1.1.2.2 blob.h,1.1.2.1,1.1.2.2 main.cpp,1.1.2.1,1.1.2.2
- Next by Date:
[paragui-cvs] CVS: paragui/src/widgets pgwidgetlist.cpp,1.3.6.4,1.3.6.5
- Previous by thread:
[paragui-cvs] CVS: paragui/test/fireworks blob.cpp,1.1.2.1,1.1.2.2 blob.h,1.1.2.1,1.1.2.2 main.cpp,1.1.2.1,1.1.2.2
- Next by thread:
[paragui-cvs] CVS: paragui/src/widgets pgwidgetlist.cpp,1.3.6.4,1.3.6.5
- Index(es):