File tree Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ extern "C" {
1212// Use rand, and srand for such system.
1313static double drand48 (void )
1414{
15- return ((double )rand ())/RAND_MAX ;
15+ return ((double )rand ())/RAND_MAX ;
1616}
1717
1818static void srand48 (long int seedval )
1919{
20- srand (seedval );
20+ srand (seedval );
2121}
2222#endif
2323
Original file line number Diff line number Diff line change 5050#ifdef _WIN32
5151// https://github.com/rtv/Stage/blob/master/replace/dirname.c
5252static
53- char * dirname (char *path)
53+ char * dirname (char * path)
5454{
5555 static const char dot[] = " ." ;
56- char *last_slash;
56+ char * last_slash;
5757
5858 /* Find last '/'. */
59- last_slash = path != NULL ? strrchr (path, ' /' ) : NULL ;
59+ last_slash = path != NULL ? strrchr (path, ' /' ) : NULL ;
6060
61- if (last_slash == path)
61+ if (last_slash == path) {
6262 /* The last slash is the first character in the string. We have to
6363 return "/". */
6464 ++last_slash;
65- else if (last_slash != NULL && last_slash[1 ] == ' \0 ' )
65+ } else if (last_slash != NULL && last_slash[1 ] == ' \0 ' ) {
6666 /* The '/' is the last character, we have to look further. */
6767 last_slash = reinterpret_cast <char *>(memchr (path, last_slash - path, ' /' ));
68+ }
6869
69- if (last_slash != NULL )
70+ if (last_slash != NULL ) {
7071 /* Terminate the path. */
7172 last_slash[0 ] = ' \0 ' ;
72- else
73+ } else {
7374 /* This assignment is ill-designed but the XPG specs require to
7475 return a string containing "." in any case no directory part is
7576 found and so a static and constant string is required. */
7677 path = reinterpret_cast <char *>(dot);
78+ }
7779
7880 return path;
7981}
Original file line number Diff line number Diff line change @@ -389,9 +389,9 @@ validate(
389389}
390390
391391#ifdef _WIN32
392- static const char * basename (const char *filepath)
392+ static const char * basename (const char * filepath)
393393{
394- const char * base = std::strrchr (filepath, ' /' );
394+ const char * base = std::strrchr (filepath, ' /' );
395395 return base ? (base + 1 ) : filepath;
396396}
397397#endif
You can’t perform that action at this time.
0 commit comments