Mercurial > dwindows
diff dwtest.c @ 2451:44b77654c406
Add DW_DIR_SEPARATOR for easy access to the separator characters.
There is something similar in dwcompat.h but I don't want to require
including dwcompat.h on Unix, in case dwcompat isn't built.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 10 Apr 2021 20:11:43 +0000 |
parents | 7e1828dd4fe0 |
children | 596bbc06e134 |
line wrap: on
line diff
--- a/dwtest.c Sat Apr 10 20:09:58 2021 +0000 +++ b/dwtest.c Sat Apr 10 20:11:43 2021 +0000 @@ -1151,11 +1151,7 @@ int pos = (int)strlen(appdir); strncpy(pathbuff, appdir, 1024); -#if defined(__OS2__) || defined(__WIN32__) - pathbuff[pos] = '\\'; -#else - pathbuff[pos] = '/'; -#endif + pathbuff[pos] = DW_DIR_SEPARATOR; pos++; strncpy(&pathbuff[pos], "test", 1024-pos); image = dw_pixmap_new_from_file(textbox2, pathbuff); @@ -2151,11 +2147,7 @@ int pos = (int)strlen(appdir); strncpy(pathbuff, appdir, 1024); -#if defined(__OS2__) || defined(__WIN32__) - pathbuff[pos] = '\\'; -#else - pathbuff[pos] = '/'; -#endif + pathbuff[pos] = DW_DIR_SEPARATOR; pos++; strncpy(&pathbuff[pos], FOLDER_ICON_NAME, 1024-pos); foldericon = dw_icon_load_from_file(pathbuff);