Skip to content

Commit

Permalink
Fixed C++ style comments in plain C files (STR #997)
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4548 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Matthias Melcher committed Aug 29, 2005
1 parent d952d9b commit a2effb7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -3,6 +3,7 @@ CHANGES IN FLTK 1.1.7
- Documentation fixes (STR #571, STR #648, STR #692, STR
#730, STR #744, STR #745, STR #931, STR #942, STR #960,
STR #969)
- Fixed C Plus Plus style comments in C files (STR #997)
- Fixed signednes of scanf argument (STR #996)
- Fixed cross-compiling (host: *-linux-* , target: *-mingw32)
problem. Patch provided by Amir Shalem <amir@boom.org.il> in (STR #995) .
Expand Down
11 changes: 6 additions & 5 deletions FL/filename.H
Expand Up @@ -59,11 +59,12 @@ struct dirent {char d_name[1];};

# elif defined(__APPLE__) && defined(__PROJECTBUILDER__)

// Apple's ProjectBuilder has the nasty habit of including recursively
// down the file tree. To avoid re-including <FL/dirent.h> we must
// directly include the systems math file. (Plus, I could not find a
// predefined macro for ProjectBuilder builds, so we have to define it
// in the project)
/* Apple's ProjectBuilder has the nasty habit of including recursively
* down the file tree. To avoid re-including <FL/dirent.h> we must
* directly include the systems math file. (Plus, I could not find a
* predefined macro for ProjectBuilder builds, so we have to define it
* in the project)
*/
# include <sys/types.h>
# include "/usr/include/dirent.h"

Expand Down
4 changes: 2 additions & 2 deletions src/scandir_win32.c
Expand Up @@ -56,7 +56,7 @@ int fl_scandir(const char *dirname, struct dirent ***namelist,
if ((len==1)&& (d[-1]=='.')) { strcpy(findIn, ".\\*"); is_dir = 1; }
if ((len>0) && (d[-1]=='\\')) { *d++ = '*'; *d = 0; is_dir = 1; }
if ((len>1) && (d[-1]=='.') && (d[-2]=='\\')) { d[-1] = '*'; is_dir = 1; }
if (!is_dir) { // this file may still be a directory that we need to list
if (!is_dir) { /* this file may still be a directory that we need to list */
DWORD attr = GetFileAttributes(findIn);
if (attr&FILE_ATTRIBUTE_DIRECTORY)
strcpy(d, "\\*");
Expand All @@ -74,7 +74,7 @@ int fl_scandir(const char *dirname, struct dirent ***namelist,
selectDir=(struct dirent*)malloc(sizeof(struct dirent)+strlen(find.cFileName)+2);
strcpy(selectDir->d_name, find.cFileName);
if (find.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
// Append a trailing slash to directory names...
/* Append a trailing slash to directory names... */
strcat(selectDir->d_name, "/");
}
if (!select || (*select)(selectDir)) {
Expand Down
4 changes: 2 additions & 2 deletions src/vsnprintf.c
Expand Up @@ -76,7 +76,7 @@ int fl_vsnprintf(char* buffer, size_t bufsize, const char* format, va_list ap) {
} else sign = 0;

if (*format == '*') {
// Get width from argument...
/* Get width from argument... */
format ++;
width = va_arg(ap, int);
snprintf(tptr, sizeof(tformat) - (tptr - tformat), "%d", width);
Expand All @@ -94,7 +94,7 @@ int fl_vsnprintf(char* buffer, size_t bufsize, const char* format, va_list ap) {
format ++;

if (*format == '*') {
// Get precision from argument...
/* Get precision from argument... */
format ++;
prec = va_arg(ap, int);
snprintf(tptr, sizeof(tformat) - (tptr - tformat), "%d", prec);
Expand Down

0 comments on commit a2effb7

Please sign in to comment.