Skip to content

Commit f7bbf2c

Browse files
committed
Tree: clang-format without the include sorting
1 parent 78431dc commit f7bbf2c

File tree

1,836 files changed

+161345
-158700
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,836 files changed

+161345
-158700
lines changed

cmake/msvc/config.h

+18-9
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// enable inline functions for C code
1010
////////////////////////////////////////////////////////////////////////
1111
#ifndef __cplusplus
12-
# define inline __inline
12+
#define inline __inline
1313
#endif
1414

1515
////////////////////////////////////////////////////////////////////////
@@ -23,12 +23,21 @@ typedef ptrdiff_t ssize_t;
2323
////////////////////////////////////////////////////////////////////////
2424
#if _MSC_VER < 1800
2525
#include <math.h>
26-
static inline long lrint(double x){return (long)(x > 0.0 ? x + 0.5 : x - 0.5);}
27-
static inline long lrintf(float x){return (long)(x > 0.0f ? x + 0.5f : x - 0.5f);}
28-
static inline long long llrint(double x){return (long long)(x > 0.0 ? x + 0.5 : x - 0.5);}
29-
static inline long long llrintf(float x){return (long long)(x > 0.0f ? x + 0.5f : x - 0.5f);}
30-
static inline double rint(double x){return (x > 0.0)? floor(x + 0.5) : ceil(x - 0.5);}
31-
static inline float rintf(float x){return (x > 0.0f)? floorf(x + 0.5f) : ceilf(x - 0.5f);}
26+
static inline long lrint(double x) { return (long)(x > 0.0 ? x + 0.5 : x - 0.5); }
27+
static inline long lrintf(float x) { return (long)(x > 0.0f ? x + 0.5f : x - 0.5f); }
28+
static inline long long llrint(double x)
29+
{
30+
return (long long)(x > 0.0 ? x + 0.5 : x - 0.5);
31+
}
32+
static inline long long llrintf(float x)
33+
{
34+
return (long long)(x > 0.0f ? x + 0.5f : x - 0.5f);
35+
}
36+
static inline double rint(double x) { return (x > 0.0) ? floor(x + 0.5) : ceil(x - 0.5); }
37+
static inline float rintf(float x)
38+
{
39+
return (x > 0.0f) ? floorf(x + 0.5f) : ceilf(x - 0.5f);
40+
}
3241
#endif
3342

3443
////////////////////////////////////////////////////////////////////////
@@ -43,7 +52,7 @@ static inline float rintf(float x){return (x > 0.0f)? floorf(x + 0.5f) : ceilf(x
4352
// random and srandom
4453
////////////////////////////////////////////////////////////////////////
4554
#include <stdlib.h>
46-
static inline long int random (void) { return rand(); }
47-
static inline void srandom (unsigned int seed) { srand(seed); }
55+
static inline long int random(void) { return rand(); }
56+
static inline void srandom(unsigned int seed) { srand(seed); }
4857

4958
#endif // _MSC_CONFIG_H_ ]

cmake/msvc/sys/time.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
#if _MSC_VER < 1900
1111
struct timespec {
12-
time_t tv_sec; /*! \brief Seconds since 00:00:00 GMT, 1 January 1970 */
13-
long tv_nsec; /*! \brief Additional nanoseconds since tv_sec */
12+
time_t tv_sec; /*! \brief Seconds since 00:00:00 GMT, 1 January 1970 */
13+
long tv_nsec; /*! \brief Additional nanoseconds since tv_sec */
1414
};
1515
#endif
1616

docs/doxygen/other/shared_ptr_docstub.h

100755100644
+16-17
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
namespace boost
2-
{
3-
/*!
4-
* \brief shared_ptr documentation stub
5-
*
6-
* \warning
7-
* This isn't the real shared_ptr template. It's just enough to get doxygen
8-
* to draw pretty collaboration diagrams.
9-
*
10-
* An enhanced relative of scoped_ptr with reference counted copy semantics.
11-
* The object pointed to is deleted when the last shared_ptr pointing to it
12-
* is destroyed or reset.
13-
*/
1+
namespace boost {
2+
/*!
3+
* \brief shared_ptr documentation stub
4+
*
5+
* \warning
6+
* This isn't the real shared_ptr template. It's just enough to get doxygen
7+
* to draw pretty collaboration diagrams.
8+
*
9+
* An enhanced relative of scoped_ptr with reference counted copy semantics.
10+
* The object pointed to is deleted when the last shared_ptr pointing to it
11+
* is destroyed or reset.
12+
*/
1413

15-
template<class T> class shared_ptr
14+
template <class T>
15+
class shared_ptr
1616
{
1717
public:
18+
T* px; // contained pointer
1819

19-
T * px; // contained pointer
20-
21-
}; // shared_ptr
20+
}; // shared_ptr
2221

2322

2423
} // namespace boost

docs/doxygen/other/vector_docstub.h

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
namespace std
1+
namespace std {
2+
/*!
3+
* \brief vector documentation stub
4+
*
5+
* \warning
6+
* This isn't the real vector template. It's just enough to get doxygen
7+
* to draw pretty collaboration diagrams.
8+
*/
9+
template <class T>
10+
class vector
211
{
3-
/*!
4-
* \brief vector documentation stub
5-
*
6-
* \warning
7-
* This isn't the real vector template. It's just enough to get doxygen
8-
* to draw pretty collaboration diagrams.
9-
*/
10-
template<class T> class vector
11-
{
12-
public:
13-
T *p;
14-
};
12+
public:
13+
T* p;
14+
};
1515

1616
} // namespace std

gnuradio-runtime/apps/gnuradio-config-info.cc

+65-69
Original file line numberDiff line numberDiff line change
@@ -34,74 +34,70 @@
3434
namespace po = boost::program_options;
3535
using boost::format;
3636

37-
int
38-
main(int argc, char **argv)
37+
int main(int argc, char** argv)
3938
{
40-
po::options_description desc((format("Program options: %1% [options]") % argv[0]).str());
41-
po::variables_map vm;
42-
43-
desc.add_options()
44-
("help,h", "print help message")
45-
("prefix", "print GNU Radio installation prefix")
46-
("sysconfdir", "print GNU Radio system configuration directory")
47-
("prefsdir", "print GNU Radio preferences directory")
48-
("userprefsdir", "print GNU Radio user preferences directory")
49-
("prefs", "print GNU Radio preferences")
50-
("builddate", "print GNU Radio build date (RFC2822 format)")
51-
("enabled-components", "print GNU Radio build time enabled components")
52-
("cc", "print GNU Radio C compiler version")
53-
("cxx", "print GNU Radio C++ compiler version")
54-
("cflags", "print GNU Radio CFLAGS")
55-
("version,v", "print GNU Radio version")
56-
;
57-
58-
try {
59-
po::store(po::parse_command_line(argc, argv, desc), vm);
60-
po::notify(vm);
61-
}
62-
catch (po::error& error){
63-
std::cerr << "Error: " << error.what() << std::endl << std::endl;
64-
std::cerr << desc << std::endl;
65-
return 1;
66-
}
67-
68-
if(vm.size() == 0 || vm.count("help")) {
69-
std::cout << desc << std::endl;
70-
return 1;
71-
}
72-
73-
if(vm.count("prefix"))
74-
std::cout << gr::prefix() << std::endl;
75-
76-
if(vm.count("sysconfdir"))
77-
std::cout << gr::sysconfdir() << std::endl;
78-
79-
if(vm.count("prefsdir"))
80-
std::cout << gr::prefsdir() << std::endl;
81-
82-
if(vm.count("userprefsdir"))
83-
std::cout << gr::userconf_path() << std::endl;
84-
85-
if(vm.count("prefs"))
86-
std::cout << gr::prefs::singleton()->to_string() << std::endl;
87-
88-
if(vm.count("builddate"))
89-
std::cout << gr::build_date() << std::endl;
90-
91-
if(vm.count("enabled-components"))
92-
std::cout << gr::build_time_enabled_components() << std::endl;
93-
94-
if(vm.count("version"))
95-
std::cout << gr::version() << std::endl;
96-
97-
if(vm.count("cc"))
98-
std::cout << gr::c_compiler() << std::endl;
99-
100-
if(vm.count("cxx"))
101-
std::cout << gr::cxx_compiler() << std::endl;
102-
103-
if(vm.count("cflags"))
104-
std::cout << gr::compiler_flags() << std::endl;
105-
106-
return 0;
39+
po::options_description desc(
40+
(format("Program options: %1% [options]") % argv[0]).str());
41+
po::variables_map vm;
42+
43+
desc.add_options()("help,h", "print help message")(
44+
"prefix", "print GNU Radio installation prefix")(
45+
"sysconfdir", "print GNU Radio system configuration directory")(
46+
"prefsdir", "print GNU Radio preferences directory")(
47+
"userprefsdir", "print GNU Radio user preferences directory")(
48+
"prefs", "print GNU Radio preferences")(
49+
"builddate", "print GNU Radio build date (RFC2822 format)")(
50+
"enabled-components", "print GNU Radio build time enabled components")(
51+
"cc", "print GNU Radio C compiler version")(
52+
"cxx", "print GNU Radio C++ compiler version")(
53+
"cflags", "print GNU Radio CFLAGS")("version,v", "print GNU Radio version");
54+
55+
try {
56+
po::store(po::parse_command_line(argc, argv, desc), vm);
57+
po::notify(vm);
58+
} catch (po::error& error) {
59+
std::cerr << "Error: " << error.what() << std::endl << std::endl;
60+
std::cerr << desc << std::endl;
61+
return 1;
62+
}
63+
64+
if (vm.size() == 0 || vm.count("help")) {
65+
std::cout << desc << std::endl;
66+
return 1;
67+
}
68+
69+
if (vm.count("prefix"))
70+
std::cout << gr::prefix() << std::endl;
71+
72+
if (vm.count("sysconfdir"))
73+
std::cout << gr::sysconfdir() << std::endl;
74+
75+
if (vm.count("prefsdir"))
76+
std::cout << gr::prefsdir() << std::endl;
77+
78+
if (vm.count("userprefsdir"))
79+
std::cout << gr::userconf_path() << std::endl;
80+
81+
if (vm.count("prefs"))
82+
std::cout << gr::prefs::singleton()->to_string() << std::endl;
83+
84+
if (vm.count("builddate"))
85+
std::cout << gr::build_date() << std::endl;
86+
87+
if (vm.count("enabled-components"))
88+
std::cout << gr::build_time_enabled_components() << std::endl;
89+
90+
if (vm.count("version"))
91+
std::cout << gr::version() << std::endl;
92+
93+
if (vm.count("cc"))
94+
std::cout << gr::c_compiler() << std::endl;
95+
96+
if (vm.count("cxx"))
97+
std::cout << gr::cxx_compiler() << std::endl;
98+
99+
if (vm.count("cflags"))
100+
std::cout << gr::compiler_flags() << std::endl;
101+
102+
return 0;
107103
}

gnuradio-runtime/include/gnuradio/api.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
#include <gnuradio/attributes.h>
2626

2727
#ifdef gnuradio_runtime_EXPORTS
28-
# define GR_RUNTIME_API __GR_ATTR_EXPORT
28+
#define GR_RUNTIME_API __GR_ATTR_EXPORT
2929
#else
30-
# define GR_RUNTIME_API __GR_ATTR_IMPORT
30+
#define GR_RUNTIME_API __GR_ATTR_IMPORT
3131
#endif
3232

3333
#endif /* INCLUDED_GR_RUNTIME_RUNTIME_API_H */

gnuradio-runtime/include/gnuradio/attributes.h

+41-37
Original file line numberDiff line numberDiff line change
@@ -26,65 +26,69 @@
2626
// Cross-platform attribute macros
2727
////////////////////////////////////////////////////////////////////////
2828
#if defined __GNUC__
29-
# define __GR_ATTR_ALIGNED(x) __attribute__((aligned(x)))
30-
# define __GR_ATTR_UNUSED __attribute__((unused))
31-
# define __GR_ATTR_INLINE __attribute__((always_inline))
32-
# define __GR_ATTR_DEPRECATED __attribute__((deprecated))
33-
# if __GNUC__ >= 4
34-
# define __GR_ATTR_EXPORT __attribute__((visibility("default")))
35-
# define __GR_ATTR_IMPORT __attribute__((visibility("default")))
36-
# else
37-
# define __GR_ATTR_EXPORT
38-
# define __GR_ATTR_IMPORT
39-
# endif
29+
#define __GR_ATTR_ALIGNED(x) __attribute__((aligned(x)))
30+
#define __GR_ATTR_UNUSED __attribute__((unused))
31+
#define __GR_ATTR_INLINE __attribute__((always_inline))
32+
#define __GR_ATTR_DEPRECATED __attribute__((deprecated))
33+
#if __GNUC__ >= 4
34+
#define __GR_ATTR_EXPORT __attribute__((visibility("default")))
35+
#define __GR_ATTR_IMPORT __attribute__((visibility("default")))
36+
#else
37+
#define __GR_ATTR_EXPORT
38+
#define __GR_ATTR_IMPORT
39+
#endif
4040
#elif defined __clang__
41-
# define __GR_ATTR_ALIGNED(x) __attribute__((aligned(x)))
42-
# define __GR_ATTR_UNUSED __attribute__((unused))
43-
# define __GR_ATTR_INLINE __attribute__((always_inline))
44-
# define __GR_ATTR_DEPRECATED __attribute__((deprecated))
45-
# define __GR_ATTR_EXPORT __attribute__((visibility("default")))
46-
# define __GR_ATTR_IMPORT __attribute__((visibility("default")))
41+
#define __GR_ATTR_ALIGNED(x) __attribute__((aligned(x)))
42+
#define __GR_ATTR_UNUSED __attribute__((unused))
43+
#define __GR_ATTR_INLINE __attribute__((always_inline))
44+
#define __GR_ATTR_DEPRECATED __attribute__((deprecated))
45+
#define __GR_ATTR_EXPORT __attribute__((visibility("default")))
46+
#define __GR_ATTR_IMPORT __attribute__((visibility("default")))
4747
#elif _MSC_VER
48-
# define __GR_ATTR_ALIGNED(x) __declspec(align(x))
49-
# define __GR_ATTR_UNUSED
50-
# define __GR_ATTR_INLINE __forceinline
51-
# define __GR_ATTR_DEPRECATED __declspec(deprecated)
52-
# define __GR_ATTR_EXPORT __declspec(dllexport)
53-
# define __GR_ATTR_IMPORT __declspec(dllimport)
48+
#define __GR_ATTR_ALIGNED(x) __declspec(align(x))
49+
#define __GR_ATTR_UNUSED
50+
#define __GR_ATTR_INLINE __forceinline
51+
#define __GR_ATTR_DEPRECATED __declspec(deprecated)
52+
#define __GR_ATTR_EXPORT __declspec(dllexport)
53+
#define __GR_ATTR_IMPORT __declspec(dllimport)
5454
#else
55-
# define __GR_ATTR_ALIGNED(x)
56-
# define __GR_ATTR_UNUSED
57-
# define __GR_ATTR_INLINE
58-
# define __GR_ATTR_DEPRECATED
59-
# define __GR_ATTR_EXPORT
60-
# define __GR_ATTR_IMPORT
55+
#define __GR_ATTR_ALIGNED(x)
56+
#define __GR_ATTR_UNUSED
57+
#define __GR_ATTR_INLINE
58+
#define __GR_ATTR_DEPRECATED
59+
#define __GR_ATTR_EXPORT
60+
#define __GR_ATTR_IMPORT
6161
#endif
6262

6363
////////////////////////////////////////////////////////////////////////
6464
// define inline when building C
6565
////////////////////////////////////////////////////////////////////////
6666
#if defined(_MSC_VER) && !defined(__cplusplus) && !defined(inline)
67-
# define inline __inline
67+
#define inline __inline
6868
#endif
6969

7070
////////////////////////////////////////////////////////////////////////
7171
// suppress warnings
7272
////////////////////////////////////////////////////////////////////////
7373
#ifdef _MSC_VER
74-
# pragma warning(disable: 4251) // class 'A<T>' needs to have dll-interface to be used by clients of class 'B'
75-
# pragma warning(disable: 4275) // non dll-interface class ... used as base for dll-interface class ...
76-
# pragma warning(disable: 4244) // conversion from 'double' to 'float', possible loss of data
77-
# pragma warning(disable: 4305) // 'initializing' : truncation from 'double' to 'float'
78-
# pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
74+
#pragma warning(disable : 4251) // class 'A<T>' needs to have dll-interface to be used by
75+
// clients of class 'B'
76+
#pragma warning(disable : 4275) // non dll-interface class ... used as base for
77+
// dll-interface class ...
78+
#pragma warning( \
79+
disable : 4244) // conversion from 'double' to 'float', possible loss of data
80+
#pragma warning(disable : 4305) // 'initializing' : truncation from 'double' to 'float'
81+
#pragma warning(disable : 4290) // C++ exception specification ignored except to indicate
82+
// a function is not __declspec(nothrow)
7983
#endif
8084

8185
////////////////////////////////////////////////////////////////////////
8286
// implement cross-compiler VLA macros
8387
////////////////////////////////////////////////////////////////////////
8488
#ifdef _MSC_VER
85-
# define __GR_VLA(TYPE, buf, size) TYPE * buf = (TYPE *) alloca(sizeof(TYPE) * (size))
89+
#define __GR_VLA(TYPE, buf, size) TYPE* buf = (TYPE*)alloca(sizeof(TYPE) * (size))
8690
#else
87-
# define __GR_VLA(TYPE, buf, size) TYPE buf[size]
91+
#define __GR_VLA(TYPE, buf, size) TYPE buf[size]
8892
#endif
8993

9094
#endif /* INCLUDED_GNURADIO_ATTRIBUTES_H */

0 commit comments

Comments
 (0)