Skip to content

Commit e1296c1

Browse files
committed
fix: update include paths and reorder includes
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - task: lint_c_examples status: passed - task: lint_c_benchmarks status: passed - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 1467fde commit e1296c1

File tree

4 files changed

+19
-21
lines changed

4 files changed

+19
-21
lines changed

lib/node_modules/@stdlib/random/base/mt19937/benchmark/c/benchmark.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
* limitations under the License.
1717
*/
1818

19+
#include "stdlib/random/base/mt19937.h"
20+
#include "stdlib/random/base/shared.h"
1921
#include <stdlib.h>
2022
#include <stdio.h>
2123
#include <stdint.h>
2224
#include <math.h>
2325
#include <time.h>
2426
#include <sys/time.h>
25-
#include "stdlib/random/base.h"
26-
#include "stdlib/random/base/mt19937.h"
2727

2828
#define NAME "base/mt19937"
2929
#define ITERATIONS 1000000

lib/node_modules/@stdlib/random/base/mt19937/examples/c/example.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919
#include "stdlib/random/base/mt19937.h"
20-
#include "stdlib/random/base.h"
20+
#include "stdlib/random/base/shared.h"
2121
#include <stdlib.h>
2222
#include <stdio.h>
2323
#include <inttypes.h>

lib/node_modules/@stdlib/random/base/mt19937/include/stdlib/random/base/mt19937.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
#ifndef STDLIB_RANDOM_BASE_MT19937_H
2020
#define STDLIB_RANDOM_BASE_MT19937_H
2121

22-
// Note: keep project includes in alphabetical order...
22+
#include "stdlib/random/base/shared.h"
2323
#include <stdint.h>
24-
#include "stdlib/random/base.h"
2524

2625
/*
2726
* If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler.

lib/node_modules/@stdlib/random/base/mt19937/src/main.c

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,11 @@
5555
* [mt19937]: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/mt19937ar.c
5656
*/
5757

58-
// Note: keep project includes in alphabetical order...
58+
#include "stdlib/random/base/mt19937.h"
59+
#include "stdlib/random/base/shared.h"
5960
#include <stdlib.h>
6061
#include <stdint.h>
6162
#include <string.h>
62-
#include "stdlib/random/base.h"
63-
#include "stdlib/random/base/mt19937.h"
6463

6564
// Forward declarations:
6665
static inline int8_t next( struct BasePRNGObject *obj, uint64_t *out );
@@ -392,11 +391,11 @@ static inline void twist( uint32_t *state, const int32_t N ) {
392391
* @return pointer to a dynamically allocated PRNG or, if unable to allocate memory, a null pointer
393392
*
394393
* @example
394+
* #include "stdlib/random/base/mt19937.h"
395+
* #include "stdlib/random/base/shared.h"
395396
* #include <stdlib.h>
396397
* #include <stdio.h>
397398
* #include <stdint.h>
398-
* #include "stdlib/random/base.h"
399-
* #include "stdlib/random/base/mt19937.h"
400399
*
401400
* // Define a PRNG seed:
402401
* uint32_t seed[] = { 12345 };
@@ -472,11 +471,11 @@ struct BasePRNGObject * stdlib_base_random_mt19937_allocate( const uint32_t *see
472471
* @param obj PRNG object
473472
*
474473
* @example
474+
* #include "stdlib/random/base/mt19937.h"
475+
* #include "stdlib/random/base/shared.h"
475476
* #include <stdlib.h>
476477
* #include <stdio.h>
477478
* #include <stdint.h>
478-
* #include "stdlib/random/base.h"
479-
* #include "stdlib/random/base/mt19937.h"
480479
*
481480
* // Define a PRNG seed:
482481
* uint32_t seed[] = { 12345 };
@@ -527,11 +526,11 @@ void stdlib_base_random_mt19937_free( struct BasePRNGObject *obj ) {
527526
* @return status code
528527
*
529528
* @example
529+
* #include "stdlib/random/base/mt19937.h"
530+
* #include "stdlib/random/base/shared.h"
530531
* #include <stdlib.h>
531532
* #include <stdio.h>
532533
* #include <stdint.h>
533-
* #include "stdlib/random/base.h"
534-
* #include "stdlib/random/base/mt19937.h"
535534
*
536535
* // Define a PRNG seed:
537536
* uint32_t seed1[] = { 12345 };
@@ -596,11 +595,11 @@ int8_t stdlib_base_random_mt19937_seed_length( const struct BasePRNGObject *obj,
596595
* @return status code
597596
*
598597
* @example
598+
* #include "stdlib/random/base/mt19937.h"
599+
* #include "stdlib/random/base/shared.h"
599600
* #include <stdlib.h>
600601
* #include <stdio.h>
601602
* #include <stdint.h>
602-
* #include "stdlib/random/base.h"
603-
* #include "stdlib/random/base/mt19937.h"
604603
*
605604
* // Define a PRNG seed:
606605
* uint32_t seed1[] = { 12345 };
@@ -664,11 +663,11 @@ int8_t stdlib_base_random_mt19937_seed( const struct BasePRNGObject *obj, uint32
664663
* @return pointer to a copy of the PRNG's internal state or, if unable to allocate memory, a null pointer
665664
*
666665
* @example
666+
* #include "stdlib/random/base/mt19937.h"
667+
* #include "stdlib/random/base/shared.h"
667668
* #include <stdlib.h>
668669
* #include <stdio.h>
669670
* #include <stdint.h>
670-
* #include "stdlib/random/base.h"
671-
* #include "stdlib/random/base/mt19937.h"
672671
*
673672
* // Define a PRNG seed:
674673
* uint32_t seed[] = { 12345 };
@@ -695,8 +694,8 @@ int8_t stdlib_base_random_mt19937_seed( const struct BasePRNGObject *obj, uint32
695694
* free( state );
696695
*/
697696
void * stdlib_base_random_mt19937_state( const struct BasePRNGObject *obj ) {
697+
const stdlib_base_random_mt19937_state_t *so;
698698
stdlib_base_random_mt19937_state_t *state;
699-
stdlib_base_random_mt19937_state_t *so;
700699
uint64_t nbytes;
701700
uint32_t *seed;
702701
if ( obj == NULL || obj->prng != &mt19937_prng ) {
@@ -735,11 +734,11 @@ void * stdlib_base_random_mt19937_state( const struct BasePRNGObject *obj ) {
735734
* @return status code
736735
*
737736
* @example
737+
* #include "stdlib/random/base/mt19937.h"
738+
* #include "stdlib/random/base/shared.h"
738739
* #include <stdlib.h>
739740
* #include <stdio.h>
740741
* #include <stdint.h>
741-
* #include "stdlib/random/base.h"
742-
* #include "stdlib/random/base/mt19937.h"
743742
*
744743
* // Define a PRNG seed:
745744
* uint32_t seed[] = { 12345 };

0 commit comments

Comments
 (0)