mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-06 01:57:40 +00:00
ab16937b74
* ntohs() won't work, because it converts from bigendian to native byteorder, and the format used in TVision streams is littleendian. Conversion must be done explicitly, by calling readByte() several times, in consecutive statements ! *This enables ncurses mouse support, which was broken (it seemed to depend on gpm in an unhealthy way). *Un*x filenames can easily contain spaces ... Don't trim the filename. *Avoid possible problems with signed/unsigned char comparisons. And functions like toupper must be called with an unsigned char. PR: 71544 Submitted by: Erling Jacobsen <linuxcub@email.dk> Set maintainer back to ports, as libh is now officially a dead project Compile with GCC 3.4 Bump PORTREVISION
44 lines
1.0 KiB
Plaintext
44 lines
1.0 KiB
Plaintext
Un*x filenames can easily contain spaces ... Don't trim the filename.
|
|
|
|
diff -ur tvision-0.8-orig/lib/TFileDialog.cc lib/TFileDialog.cc
|
|
--- tvision-0.8-orig/lib/TFileDialog.cc Thu Jul 26 09:59:20 2001
|
|
+++ lib/TFileDialog.cc Wed Sep 8 14:14:15 2004
|
|
@@ -162,6 +162,7 @@
|
|
|
|
/* 'src' is cast to unsigned char * so that isspace sign extends it
|
|
correctly. */
|
|
+/* Function defined but not used
|
|
static void trim( char *dest, const char *src )
|
|
{
|
|
while( *src != EOS && isspace( * (const unsigned char *) src ) )
|
|
@@ -170,11 +171,13 @@
|
|
*dest++ = *src++;
|
|
*dest = EOS;
|
|
}
|
|
+*/
|
|
|
|
void TFileDialog::getFileName( char *s )
|
|
{
|
|
/* SS: changed */
|
|
|
|
+#if 0
|
|
char buf[PATH_MAX];
|
|
|
|
trim( buf, fileName->data );
|
|
@@ -185,6 +188,15 @@
|
|
}
|
|
fexpand( buf );
|
|
strcpy( s, buf );
|
|
+#else
|
|
+ strcpy( s, fileName->data );
|
|
+ if( relativePath( s ) == True )
|
|
+ {
|
|
+ strcpy( s, directory );
|
|
+ strcat( s, fileName->data );
|
|
+ }
|
|
+ fexpand( s );
|
|
+#endif
|
|
}
|
|
|
|
void TFileDialog::handleEvent(TEvent& event)
|