FWGS / xash3d

DEPRECATED in favor of https://github.com/FWGS/xash3d-fwgs. Only bugfixes are accepted.
https://xash.su
GNU General Public License v3.0
553 stars 109 forks source link

Find xdg-open in PATH on Linux and BSD. #131

Closed FreeSlave closed 8 years ago

a1batross commented 8 years ago

Nice idea. But maybe better to move #includes to the top of source file? unistd.h and stddef.h are included automatically (see port.h) string.h isn't need here, look for Q_ functions. And follow Quake's code style.

FreeSlave commented 8 years ago

If you require certain code style from contributors you probably should give link to its description in README.md

But I guess you mostly mean positioning of braces, e.g. braces on their own lines around multi-line statement and no braces around one-line statement.

a1batross commented 8 years ago

Yeah, there is must be a some recommendations for it. Yes, I mean braces placement. And also spaces in parentheses.

Anyway, month ago I did a config for clang-format. I should publish it. %)

nekonomicon commented 8 years ago

@MyLittleRobo, It's portable :) AFAIK, xdg-utils works on Solaris and other OSes yet. I think needs rework macros. Best way: !_WIN32 || !_APPLE||!__ANDROID__

FreeSlave commented 8 years ago

@nekonomicon, I don't think platform capabilities should be inferred from negation of macros. There're other non-unix platforms (AmigaOS, Haiku, etc.) and also proprietary unices (e.g. HP-UX) that probably don't provide xdg-utils. Don't know if we ever get xash on them though.

Also I guess it should be &&, not || in your variant.

nekonomicon commented 8 years ago

Also I guess it should be &&, not || in your variant.

Oh, yes, my wrong.

a1batross commented 8 years ago

I posted .clang-format in master branch. So code style isn't a problem now.