// The constructed where clause below has a sub-query within it "SELECT MIN(NAME) FROM %s"
// to achieve a single row (in this case the first name in alphabetical order).
- Contact->whereStr.Printf("NAME = (SELECT MIN(NAME) FROM %s)",Contact->tableName);
+ // commented out because PostgreSQL can't do this
+ //Contact->whereStr.Printf("NAME = (SELECT MIN(NAME) FROM %s)",Contact->tableName);
// NOTE: (const char*) returns a pointer which may not be valid later, so this is short term use only
Contact->where = (char*) (const char*) Contact->whereStr;
}
}
+ // commented out because PostgreSQL can't do this
+
// Previous record not available, retrieve first record in table
- Contact->whereStr = "NAME = (SELECT MIN(NAME) FROM ";
- Contact->whereStr += Contact->tableName;
- Contact->whereStr += ")";
+ //Contact->whereStr = "NAME = (SELECT MIN(NAME) FROM ";
+ //Contact->whereStr += Contact->tableName;
+ //Contact->whereStr += ")";
+
Contact->where = (char*) (const char*) Contact->whereStr;
if (!Contact->Query())
{
// display it, if the query string has changed.
if (strcmp(qryWhere, (const char*) Contact->qryWhereStr))
{
- Contact->orderBy = "NAME";
- Contact->whereStr = "NAME = (SELECT MIN(NAME) FROM ";
- Contact->whereStr += CONTACT_TABLE_NAME;
+
+ // commented out because PostgreSQL can't do this
+ Contact->whereStr = "";
+ //Contact->orderBy = "NAME";
+ //Contact->whereStr = "NAME = (SELECT MIN(NAME) FROM ";
+ //Contact->whereStr += CONTACT_TABLE_NAME;
// Append the query where string (if there is one)
Contact->qryWhereStr = qryWhere;
Contact->whereStr += Contact->qryWhereStr;
}
// Close the expression with a right paren
- Contact->whereStr += ")";
+ // Contact->whereStr += ")";
// Requery the table
Contact->where = (char*) (const char*) Contact->whereStr;
if (!Contact->Query())
// Query the first record in the table
Contact->orderBy = "NAME";
- Contact->whereStr = "NAME = (SELECT MIN(NAME) FROM ";
- Contact->whereStr += CONTACT_TABLE_NAME;
- Contact->whereStr += ")";
+ // commented out because PostgreSQL can't do this
+ //Contact->whereStr = "NAME = (SELECT MIN(NAME) FROM ";
+ //Contact->whereStr += CONTACT_TABLE_NAME;
+ //Contact->whereStr += ")";
Contact->where = (char*) (const char*) Contact->whereStr;
if (!Contact->Query())
{
wxString w;
-
- w = "NAME = (SELECT MIN(NAME) FROM ";
- w += Contact->tableName;
- w += " WHERE NAME > '";
+ // commented out because PostgreSQL can't do this
+ //w = "NAME = (SELECT MIN(NAME) FROM ";
+ //w += Contact->tableName;
+ // w += " WHERE NAME > '";
+ w = "(NAME > '";
w += Contact->Name;
w += "'";
{
wxString w;
- w = "NAME = (SELECT MAX(NAME) FROM ";
- w += Contact->tableName;
- w += " WHERE NAME < '";
+ // commented out because PostgreSQL can't do this
+ //w = "NAME = (SELECT MAX(NAME) FROM ";
+ //w += Contact->tableName;
+ //w += " WHERE NAME < '";
+ w = "(NAME < '";
w += Contact->Name;
w += "'";
} currentToken = Field_Type;
// the flags and field values on the current line
- bool needsterminal = false,
- copiousoutput = false;
+ bool needsterminal = FALSE,
+ copiousoutput = FALSE;
wxString strType,
strOpenCmd,
strPrintCmd,
#endif
#include "unistd.h"
-#ifdef __SUN__
+// add more here if you run into problems
+#if defined(__SUN__) && !defined(__SunOs_5_6) && !defined(__SunOs_5_7)
extern "C"
{
void usleep(unsigned long usec);
if (sm_overlayWindow) gdk_window_show( sm_overlayWindow );
- return (sm_overlayWindow);
+ return (sm_overlayWindow != NULL);
}
bool wxScreenDC::EndDrawingOnTop(void)
M_FONTDATA->m_font = gdk_font_load( xFontName );
}
-wxFont::wxFont( int pointSize, int family, int style, int weight, bool underlined = FALSE,
- const wxString& face = wxEmptyString )
+wxFont::wxFont( int pointSize, int family, int style, int weight, bool underlined, const wxString& face )
{
m_refData = new wxFontRefData();
int max_size = point_size + 20 * (1 + (point_size/180));
int min_size = point_size - 20 * (1 + (point_size/180));
+ int i;
+
/* Search for smaller size (approx.) */
- for (int i=point_size-10; !font && i >= 10 && i >= min_size; i -= 10)
+ for (i=point_size-10; !font && i >= 10 && i >= min_size; i -= 10)
font = wxLoadQueryFont(i, family, style, weight, underlined, facename );
/* Search for larger size (approx.) */
- for (int i=point_size+10; !font && i <= max_size; i += 10)
+ for (i=point_size+10; !font && i <= max_size; i += 10)
font = wxLoadQueryFont( i, family, style, weight, underlined, facename );
/* Try default family */
wxPaletteRefData::wxPaletteRefData()
{
- m_colormap = (GdkColormap *) NULL;
-};
+ m_colormap = (GdkColormap *) NULL;
+}
wxPaletteRefData::~wxPaletteRefData()
{
- if (m_colormap) gdk_colormap_unref( m_colormap );
-};
+ if (m_colormap) gdk_colormap_unref( m_colormap );
+}
//-----------------------------------------------------------------------------
wxPalette::wxPalette()
{
-};
+}
wxPalette::wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue )
{
- m_refData = new wxPaletteRefData();
- Create( n, red, green, blue );
-};
+ m_refData = new wxPaletteRefData();
+ Create( n, red, green, blue );
+}
wxPalette::wxPalette( const wxPalette& palette )
{
- Ref( palette );
-};
+ Ref( palette );
+}
wxPalette::~wxPalette()
{
-};
+}
wxPalette& wxPalette::operator = ( const wxPalette& palette )
{
- if (*this == palette) return (*this);
- Ref( palette );
- return *this;
-};
+ if (*this == palette) return (*this);
+ Ref( palette );
+ return *this;
+}
bool wxPalette::operator == ( const wxPalette& palette )
{
- return m_refData == palette.m_refData;
-};
+ return m_refData == palette.m_refData;
+}
bool wxPalette::operator != ( const wxPalette& palette )
{
- return m_refData != palette.m_refData;
-};
+ return m_refData != palette.m_refData;
+}
bool wxPalette::Ok(void) const
{
- return (m_refData);
-};
+ return (m_refData != NULL);
+}
bool wxPalette::Create( int WXUNUSED(n),
const unsigned char *WXUNUSED(red),
const unsigned char *WXUNUSED(green),
const unsigned char *WXUNUSED(blue) )
{
- wxFAIL_MSG("not implemented");
+ wxFAIL_MSG("not implemented");
- return FALSE;
-};
+ return FALSE;
+}
int wxPalette::GetPixel( const unsigned char WXUNUSED(red),
const unsigned char WXUNUSED(green),
const unsigned char WXUNUSED(blue) ) const
{
- wxFAIL_MSG("not implemented");
+ wxFAIL_MSG("not implemented");
- return 0;
-};
+ return 0;
+}
bool wxPalette::GetRGB( int WXUNUSED(pixel),
unsigned char *WXUNUSED(red),
unsigned char *WXUNUSED(green),
unsigned char *WXUNUSED(blue) ) const
{
- wxFAIL_MSG("not implemented");
-
- return 0;
-};
+ wxFAIL_MSG("not implemented");
+
+ return 0;
+}
int max_len = 0;
wxNode *node = m_boxes.Nth( j*num_per_major );
- for (int i = 0; i< num_per_major; i++)
+ for (int i1 = 0; i1< num_per_major; i1++)
{
GtkWidget *button = GTK_WIDGET( node->Data() );
GtkLabel *label = GTK_LABEL( GTK_BUTTON(button)->child );
// we don't know the max_len before
node = m_boxes.Nth( j*num_per_major );
- for (int i = 0; i< num_per_major; i++)
+ for (int i2 = 0; i2< num_per_major; i2++)
{
GtkWidget *button = GTK_WIDGET( node->Data() );
#endif
#include "unistd.h"
-#ifdef __SUN__
+// add more here if you run into problems
+#if defined(__SUN__) && !defined(__SunOs_5_6) && !defined(__SunOs_5_7)
extern "C"
{
void usleep(unsigned long usec);
if (sm_overlayWindow) gdk_window_show( sm_overlayWindow );
- return (sm_overlayWindow);
+ return (sm_overlayWindow != NULL);
}
bool wxScreenDC::EndDrawingOnTop(void)
M_FONTDATA->m_font = gdk_font_load( xFontName );
}
-wxFont::wxFont( int pointSize, int family, int style, int weight, bool underlined = FALSE,
- const wxString& face = wxEmptyString )
+wxFont::wxFont( int pointSize, int family, int style, int weight, bool underlined, const wxString& face )
{
m_refData = new wxFontRefData();
int max_size = point_size + 20 * (1 + (point_size/180));
int min_size = point_size - 20 * (1 + (point_size/180));
+ int i;
+
/* Search for smaller size (approx.) */
- for (int i=point_size-10; !font && i >= 10 && i >= min_size; i -= 10)
+ for (i=point_size-10; !font && i >= 10 && i >= min_size; i -= 10)
font = wxLoadQueryFont(i, family, style, weight, underlined, facename );
/* Search for larger size (approx.) */
- for (int i=point_size+10; !font && i <= max_size; i += 10)
+ for (i=point_size+10; !font && i <= max_size; i += 10)
font = wxLoadQueryFont( i, family, style, weight, underlined, facename );
/* Try default family */
wxPaletteRefData::wxPaletteRefData()
{
- m_colormap = (GdkColormap *) NULL;
-};
+ m_colormap = (GdkColormap *) NULL;
+}
wxPaletteRefData::~wxPaletteRefData()
{
- if (m_colormap) gdk_colormap_unref( m_colormap );
-};
+ if (m_colormap) gdk_colormap_unref( m_colormap );
+}
//-----------------------------------------------------------------------------
wxPalette::wxPalette()
{
-};
+}
wxPalette::wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue )
{
- m_refData = new wxPaletteRefData();
- Create( n, red, green, blue );
-};
+ m_refData = new wxPaletteRefData();
+ Create( n, red, green, blue );
+}
wxPalette::wxPalette( const wxPalette& palette )
{
- Ref( palette );
-};
+ Ref( palette );
+}
wxPalette::~wxPalette()
{
-};
+}
wxPalette& wxPalette::operator = ( const wxPalette& palette )
{
- if (*this == palette) return (*this);
- Ref( palette );
- return *this;
-};
+ if (*this == palette) return (*this);
+ Ref( palette );
+ return *this;
+}
bool wxPalette::operator == ( const wxPalette& palette )
{
- return m_refData == palette.m_refData;
-};
+ return m_refData == palette.m_refData;
+}
bool wxPalette::operator != ( const wxPalette& palette )
{
- return m_refData != palette.m_refData;
-};
+ return m_refData != palette.m_refData;
+}
bool wxPalette::Ok(void) const
{
- return (m_refData);
-};
+ return (m_refData != NULL);
+}
bool wxPalette::Create( int WXUNUSED(n),
const unsigned char *WXUNUSED(red),
const unsigned char *WXUNUSED(green),
const unsigned char *WXUNUSED(blue) )
{
- wxFAIL_MSG("not implemented");
+ wxFAIL_MSG("not implemented");
- return FALSE;
-};
+ return FALSE;
+}
int wxPalette::GetPixel( const unsigned char WXUNUSED(red),
const unsigned char WXUNUSED(green),
const unsigned char WXUNUSED(blue) ) const
{
- wxFAIL_MSG("not implemented");
+ wxFAIL_MSG("not implemented");
- return 0;
-};
+ return 0;
+}
bool wxPalette::GetRGB( int WXUNUSED(pixel),
unsigned char *WXUNUSED(red),
unsigned char *WXUNUSED(green),
unsigned char *WXUNUSED(blue) ) const
{
- wxFAIL_MSG("not implemented");
-
- return 0;
-};
+ wxFAIL_MSG("not implemented");
+
+ return 0;
+}
int max_len = 0;
wxNode *node = m_boxes.Nth( j*num_per_major );
- for (int i = 0; i< num_per_major; i++)
+ for (int i1 = 0; i1< num_per_major; i1++)
{
GtkWidget *button = GTK_WIDGET( node->Data() );
GtkLabel *label = GTK_LABEL( GTK_BUTTON(button)->child );
// we don't know the max_len before
node = m_boxes.Nth( j*num_per_major );
- for (int i = 0; i< num_per_major; i++)
+ for (int i2 = 0; i2< num_per_major; i2++)
{
GtkWidget *button = GTK_WIDGET( node->Data() );