aboutsummaryrefslogblamecommitdiffstats
path: root/include/inttypes.h
blob: 5272ebcfe9134b31947afe021e670cb8ecd7c874 (plain) (tree)
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098






















                                                                        
                   
                         

 


                        
                      












                                                     
                                     
                                         
 











                                                     
                                         
 

 


























                                         












                          


































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































                                                

      
/**
 * slibc — Yet another C library
 * Copyright © 2015  Mattias Andrée (maandree@member.fsf.org)
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef _STDLIB_H
#define _STDLIB_H
#include <slibc/version.h>
#include <slibc/features.h>


#include <stdint.h>
#include <bits/intconf.h>



#define __NEED_intmax_t
#define __NEED_imaxdiv_t
#define __NEED_wchar_t

#include <bits/types.h>


/**
 * Perform an integer division and return
 * both the quotient and the remainder.
 * 
 * @param   numerator    The numerator.
 * @param   denominator  The denominator.
 * @return               The quotient in `.quot`, and
 *                       the remainder in `.rem`.
 */
imaxdiv_t imaxdiv(intmax_t, intmax_t)
  __GCC_ONLY(__attribute__((__const__)));

/**
 * Return the absolute value of an integer.
 * 
 * Be aware, if the value is `INTMAX_MIN` and
 * `-INTMAX_MAX != -INTMAX_MIN`, the result will
 * overflow, and `INTMAX_MIN` will (probably)
 * be returned.
 * 
 * @param   value  The integer.
 * @return         The absolute value of the integer.
 */
intmax_t imaxabs(intmax_t)
  __GCC_ONLY(__attribute__((__const__)));



/* Printing and scanning code affixes. */

#define __PRI8  ""
#define __SCN8  "hh"

#define __PRI16  ""
#define __SCN16  "h"

#if __INT_BIT == 32
# define __PRI32  ""
# define __SCN32  ""
#else
# define __PRI32  "l"
# define __SCN32  "l"
#endif

#if __LONG_BIT == 64
# define __PRI64  "l"
# define __SCN64  "l"
#else
# define __PRI64  "ll"
# define __SCN64  "ll"
#endif

#define __PRIMAX  "j"
#define __SCNMAX  "j"

#if __PTR_BIT == 8
# define __PRIPTR  __PRI8
# define __SCNPTR  __SCN8
#elif __PTR_BIT == 16
# define __PRIPTR  __PRI16
# define __SCNPTR  __SCN16
#elif __PTR_BIT == 32
# define __PRIPTR  __PRI32
# define __SCNPTR  __SCN32
#elif __PTR_BIT == 64
# define __PRIPTR  __PRI64
# define __SCNPTR  __SCN64
#endif



/* Printing codes. */


/**
 * %-code, excluding the %, for printing
 * an int8_t in decimal form.
 */
#define PRId8  __PRI8 "d"

/**
 * %-code, excluding the %, for printing
 * an int16_t in decimal form.
 */
#define PRId16  __PRI16 "d"

/**
 * %-code, excluding the %, for printing
 * an int32_t in decimal form.
 */
#define PRId32  __PRI32 "d"

/**
 * %-code, excluding the %, for printing
 * an int64_t in decimal form.
 */
#define PRId64  __PRI64 "d"


/**
 * %-code, excluding the %, for printing
 * an int_least8_t in decimal form.
 */
#define PRIdLEAST8  PRId8

/**
 * %-code, excluding the %, for printing
 * an int_least16_t in decimal form.
 */
#define PRIdLEAST16  PRId16

/**
 * %-code, excluding the %, for printing
 * an int_least32_t in decimal form.
 */
#define PRIdLEAST32  PRId32

/**
 * %-code, excluding the %, for printing
 * an int_least64_t in decimal form.
 */
#define PRIdLEAST64  PRId64


/**
 * %-code, excluding the %, for printing
 * an int_fast8_t in decimal form.
 */
#define PRIdFAST8  __PRIFAST8 "d"

/**
 * %-code, excluding the %, for printing
 * an int_fast16_t in decimal form.
 */
#define PRIdFAST16  __PRIFAST16 "d"

/**
 * %-code, excluding the %, for printing
 * an int_fast32_t in decimal form.
 */
#define PRIdFAST32  __PRIFAST32 "d"

/**
 * %-code, excluding the %, for printing
 * an int_fast64_t in decimal form.
 */
#define PRIdFAST64  __PRIFAST64 "d"



/**
 * %-code, excluding the %, for printing
 * an int8_t in decimal form.
 */
#define PRIi8  __PRI8 "i"

/**
 * %-code, excluding the %, for printing
 * an int16_t in decimal form.
 */
#define PRIi16  __PRI16 "i"

/**
 * %-code, excluding the %, for printing
 * an int32_t in decimal form.
 */
#define PRIi32  __PRI32 "i"

/**
 * %-code, excluding the %, for printing
 * an int64_t in decimal form.
 */
#define PRIi64  __PRI64 "i"


/**
 * %-code, excluding the %, for printing
 * an int_least8_t in decimal form.
 */
#define PRIiLEAST8  PRIi8

/**
 * %-code, excluding the %, for printing
 * an int_least16_t in decimal form.
 */
#define PRIiLEAST16  PRIi16

/**
 * %-code, excluding the %, for printing
 * an int_least32_t in decimal form.
 */
#define PRIiLEAST32  PRIi32

/**
 * %-code, excluding the %, for printing
 * an int_least64_t in decimal form.
 */
#define PRIiLEAST64  PRIi64


/**
 * %-code, excluding the %, for printing
 * an int_fast8_t in decimal form.
 */
#define PRIiFAST8  __PRIFAST8 "i"

/**
 * %-code, excluding the %, for printing
 * an int_fast16_t in decimal form.
 */
#define PRIiFAST16  __PRIFAST16 "i"

/**
 * %-code, excluding the %, for printing
 * an int_fast32_t in decimal form.
 */
#define PRIiFAST32  __PRIFAST32 "i"

/**
 * %-code, excluding the %, for printing
 * an int_fast64_t in decimal form.
 */
#define PRIiFAST64  __PRIFAST64 "i"



/**
 * %-code, excluding the %, for printing
 * an uint8_t in octal form.
 */
#define PRIo8  __PRI8 "o"

/**
 * %-code, excluding the %, for printing
 * an uint16_t in octal form.
 */
#define PRIo16  __PRI16 "o"

/**
 * %-code, excluding the %, for printing
 * an uint32_t in octal form.
 */
#define PRIo32  __PRI32 "o"

/**
 * %-code, excluding the %, for printing
 * an uint64_t in octal form.
 */
#define PRIo64  __PRI64 "o"


/**
 * %-code, excluding the %, for printing
 * an uint_least8_t in octal form.
 */
#define PRIoLEAST8  PRIo8

/**
 * %-code, excluding the %, for printing
 * an uint_least16_t in octal form.
 */
#define PRIoLEAST16  PRIo16

/**
 * %-code, excluding the %, for printing
 * an uint_least32_t in octal form.
 */
#define PRIoLEAST32  PRIo32

/**
 * %-code, excluding the %, for printing
 * an uint_least64_t in octal form.
 */
#define PRIoLEAST64  PRIo64


/**
 * %-code, excluding the %, for printing
 * an uint_fast8_t in octal form.
 */
#define PRIoFAST8  __PRIFAST8 "o"

/**
 * %-code, excluding the %, for printing
 * an uint_fast16_t in octal form.
 */
#define PRIoFAST16  __PRIFAST16 "o"

/**
 * %-code, excluding the %, for printing
 * an uint_fast32_t in octal form.
 */
#define PRIoFAST32  __PRIFAST32 "o"

/**
 * %-code, excluding the %, for printing
 * an uint_fast64_t in octal form.
 */
#define PRIoFAST64  __PRIFAST64 "o"



/**
 * %-code, excluding the %, for printing
 * an uint8_t in decimal form.
 */
#define PRIu8  __PRI8 "u"

/**
 * %-code, excluding the %, for printing
 * an uint16_t in decimal form.
 */
#define PRIu16  __PRI16 "u"

/**
 * %-code, excluding the %, for printing
 * an uint32_t in decimal form.
 */
#define PRIu32  __PRI32 "u"

/**
 * %-code, excluding the %, for printing
 * an uint64_t in decimal form.
 */
#define PRIu64  __PRI64 "u"


/**
 * %-code, excluding the %, for printing
 * an uint_least8_t in decimal form.
 */
#define PRIuLEAST8  PRIu8

/**
 * %-code, excluding the %, for printing
 * an uint_least16_t in decimal form.
 */
#define PRIuLEAST16  PRIu16

/**
 * %-code, excluding the %, for printing
 * an uint_least32_t in decimal form.
 */
#define PRIuLEAST32  PRIu32

/**
 * %-code, excluding the %, for printing
 * an uint_least64_t in decimal form.
 */
#define PRIuLEAST64  PRIu64


/**
 * %-code, excluding the %, for printing
 * an uint_fast8_t in decimal form.
 */
#define PRIuFAST8  __PRIFAST8 "u"

/**
 * %-code, excluding the %, for printing
 * an uint_fast16_t in decimal form.
 */
#define PRIuFAST16  __PRIFAST16 "u"

/**
 * %-code, excluding the %, for printing
 * an uint_fast32_t in decimal form.
 */
#define PRIuFAST32  __PRIFAST32 "u"

/**
 * %-code, excluding the %, for printing
 * an uint_fast64_t in decimal form.
 */
#define PRIuFAST64  __PRIFAST64 "u"



/**
 * %-code, excluding the %, for printing an
 * uint8_t in lowercase hexadecimal form.
 */
#define PRIx8  __PRI8 "x"

/**
 * %-code, excluding the %, for printing an
 * uint16_t in lowercase hexadecimal form.
 */
#define PRIx16  __PRI16 "x"

/**
 * %-code, excluding the %, for printing an
 * uint32_t in lowercase hexadecimal form.
 */
#define PRIx32  __PRI32 "x"

/**
 * %-code, excluding the %, for printing an
 * uint64_t in lowercase hexadecimal form.
 */
#define PRIx64  __PRI64 "x"


/**
 * %-code, excluding the %, for printing an
 * uint_least8_t in lowercase hexadecimal form.
 */
#define PRIxLEAST8  PRIx8

/**
 * %-code, excluding the %, for printing an
 * uint_least16_t in lowercase hexadecimal form.
 */
#define PRIxLEAST16  PRIx16

/**
 * %-code, excluding the %, for printing an
 * uint_least32_t in lowercase hexadecimal form.
 */
#define PRIxLEAST32  PRIx32

/**
 * %-code, excluding the %, for printing an
 * uint_least64_t in lowercase hexadecimal form.
 */
#define PRIxLEAST64  PRIx64


/**
 * %-code, excluding the %, for printing an
 * uint_fast8_t in lowercase hexadecimal form.
 */
#define PRIxFAST8  __PRIFAST8 "x"

/**
 * %-code, excluding the %, for printing an
 * uint_fast16_t in lowercase hexadecimal form.
 */
#define PRIxFAST16  __PRIFAST16 "x"

/**
 * %-code, excluding the %, for printing an
 * uint_fast32_t in lowercase hexadecimal form.
 */
#define PRIxFAST32  __PRIFAST32 "x"

/**
 * %-code, excluding the %, for printing an
 * uint_fast64_t in lowercase hexadecimal form.
 */
#define PRIxFAST64  __PRIFAST64 "x"



/**
 * %-code, excluding the %, for printing an
 * uint8_t in uppercase hexadecimal form.
 */
#define PRIX8  __PRI8 "X"

/**
 * %-code, excluding the %, for printing an
 * uint16_t in uppercase hexadecimal form.
 */
#define PRIX16  __PRI16 "X"

/**
 * %-code, excluding the %, for printing an
 * uint32_t in uppercase hexadecimal form.
 */
#define PRIX32  __PRI32 "X"

/**
 * %-code, excluding the %, for printing an
 * uint64_t in uppercase hexadecimal form.
 */
#define PRIX64  __PRI64 "X"


/**
 * %-code, excluding the %, for printing an
 * uint_least8_t in uppercase hexadecimal form.
 */
#define PRIXLEAST8  PRIX8

/**
 * %-code, excluding the %, for printing an
 * uint_least16_t in uppercase hexadecimal form.
 */
#define PRIXLEAST16  PRIX16

/**
 * %-code, excluding the %, for printing an
 * uint_least32_t in uppercase hexadecimal form.
 */
#define PRIXLEAST32  PRIX32

/**
 * %-code, excluding the %, for printing an
 * uint_least64_t in uppercase hexadecimal form.
 */
#define PRIXLEAST64  PRIX64


/**
 * %-code, excluding the %, for printing an
 * uint_fast8_t in uppercase hexadecimal form.
 */
#define PRIXFAST8  __PRIFAST8 "X"

/**
 * %-code, excluding the %, for printing an
 * uint_fast16_t in uppercase hexadecimal form.
 */
#define PRIXFAST16  __PRIFAST16 "X"

/**
 * %-code, excluding the %, for printing an
 * uint_fast32_t in uppercase hexadecimal form.
 */
#define PRIXFAST32  __PRIFAST32 "X"

/**
 * %-code, excluding the %, for printing an
 * uint_fast64_t in uppercase hexadecimal form.
 */
#define PRIXFAST64  __PRIFAST64 "X"



/**
 * %-code, excluding the %, for printing an
 * intmax_t in decimal form.
 */
#define PRIdMAX __PRIMAX "d"

/**
 * %-code, excluding the %, for printing an
 * intmax_t in decimal form.
 */
#define PRIiMAX __PRIMAX "i"

/**
 * %-code, excluding the %, for printing an
 * uintmax_t in octal form.
 */
#define PRIoMAX __PRIMAX "o"

/**
 * %-code, excluding the %, for printing an
 * uintmax_t in decimal form.
 */
#define PRIuMAX __PRIMAX "u"

/**
 * %-code, excluding the %, for printing an
 * uintmax_t in lowercase hexadecimal form.
 */
#define PRIxMAX __PRIMAX "x"

/**
 * %-code, excluding the %, for printing an
 * uintmax_t in uppercase hexadecimal form.
 */
#define PRIXMAX __PRIMAX "X"



/**
 * %-code, excluding the %, for printing
 * an intptr_t, ptrdiff_t, or ssize_t
 * in decimal form.
 */
#define PRIdPTR __PRIPTR "d"

/**
 * %-code, excluding the %, for printing
 * an intptr_t, ptrdiff_t, or ssize_t
 * in decimal form.
 */
#define PRIiPTR __PRIPTR "i"

/**
 * %-code, excluding the %, for printing
 * an uintptr_t, uptrdiff_t, or size_t
 * in octal form.
 */
#define PRIoPTR __PRIPTR "o"

/**
 * %-code, excluding the %, for printing
 * an uintptr_t, uptrdiff_t, or size_t
 * in decimal form.
 */
#define PRIuPTR __PRIPTR "u"

/**
 * %-code, excluding the %, for printing
 * an uintptr_t, uptrdiff_t, or size_t
 * in lowercase hexadecimal form.
 */
#define PRIxPTR __PRIPTR "x"

/**
 * %-code, excluding the %, for printing
 * an uintptr_t, uptrdiff_t, or size_t
 * in uppercase hexadecimal form.
 */
#define PRIXPTR __PRIPTR "X"



/* Scanning codes. */


/**
 * %-code, excluding the %, for scanning
 * an int8_t from decimal form.
 */
#define SCNd8  __SCN8 "d"

/**
 * %-code, excluding the %, for scanning
 * an int16_t from decimal form.
 */
#define SCNd16  __SCN16 "d"

/**
 * %-code, excluding the %, for scanning
 * an int32_t from decimal form.
 */
#define SCNd32  __SCN32 "d"

/**
 * %-code, excluding the %, for scanning
 * an int64_t from decimal form.
 */
#define SCNd64  __SCN64 "d"


/**
 * %-code, excluding the %, for scanning
 * an int_least8_t from decimal form.
 */
#define SCNdLEAST8  SCNd8

/**
 * %-code, excluding the %, for scanning
 * an int_least16_t from decimal form.
 */
#define SCNdLEAST16  SCNd16

/**
 * %-code, excluding the %, for scanning
 * an int_least32_t from decimal form.
 */
#define SCNdLEAST32  SCNd32

/**
 * %-code, excluding the %, for scanning
 * an int_least64_t from decimal form.
 */
#define SCNdLEAST64  SCNd64


/**
 * %-code, excluding the %, for scanning
 * an int_fast8_t from decimal form.
 */
#define SCNdFAST8  __SCNFAST8 "d"

/**
 * %-code, excluding the %, for scanning
 * an int_fast16_t from decimal form.
 */
#define SCNdFAST16  __SCNFAST16 "d"

/**
 * %-code, excluding the %, for scanning
 * an int_fast32_t from decimal form.
 */
#define SCNdFAST32  __SCNFAST32 "d"

/**
 * %-code, excluding the %, for scanning
 * an int_fast64_t from decimal form.
 */
#define SCNdFAST64  __SCNFAST64 "d"



/**
 * %-code, excluding the %, for scanning
 * an int8_t from decimal form.
 */
#define SCNi8  __SCN8 "i"

/**
 * %-code, excluding the %, for scanning
 * an int16_t from decimal form.
 */
#define SCNi16  __SCN16 "i"

/**
 * %-code, excluding the %, for scanning
 * an int32_t from decimal form.
 */
#define SCNi32  __SCN32 "i"

/**
 * %-code, excluding the %, for scanning
 * an int64_t from decimal form.
 */
#define SCNi64  __SCN64 "i"


/**
 * %-code, excluding the %, for scanning
 * an int_least8_t from decimal form.
 */
#define SCNiLEAST8  SCNi8

/**
 * %-code, excluding the %, for scanning
 * an int_least16_t from decimal form.
 */
#define SCNiLEAST16  SCNi16

/**
 * %-code, excluding the %, for scanning
 * an int_least32_t from decimal form.
 */
#define SCNiLEAST32  SCNi32

/**
 * %-code, excluding the %, for scanning
 * an int_least64_t from decimal form.
 */
#define SCNiLEAST64  SCNi64


/**
 * %-code, excluding the %, for scanning
 * an int_fast8_t from decimal form.
 */
#define SCNiFAST8  __SCNFAST8 "i"

/**
 * %-code, excluding the %, for scanning
 * an int_fast16_t from decimal form.
 */
#define SCNiFAST16  __SCNFAST16 "i"

/**
 * %-code, excluding the %, for scanning
 * an int_fast32_t from decimal form.
 */
#define SCNiFAST32  __SCNFAST32 "i"

/**
 * %-code, excluding the %, for scanning
 * an int_fast64_t from decimal form.
 */
#define SCNiFAST64  __SCNFAST64 "i"



/**
 * %-code, excluding the %, for scanning
 * an uint8_t from octal form.
 */
#define SCNo8  __SCN8 "o"

/**
 * %-code, excluding the %, for scanning
 * an uint16_t from octal form.
 */
#define SCNo16  __SCN16 "o"

/**
 * %-code, excluding the %, for scanning
 * an uint32_t from octal form.
 */
#define SCNo32  __SCN32 "o"

/**
 * %-code, excluding the %, for scanning
 * an uint64_t from octal form.
 */
#define SCNo64  __SCN64 "o"


/**
 * %-code, excluding the %, for scanning
 * an uint_least8_t from octal form.
 */
#define SCNoLEAST8  SCNo8

/**
 * %-code, excluding the %, for scanning
 * an uint_least16_t from octal form.
 */
#define SCNoLEAST16  SCNo16

/**
 * %-code, excluding the %, for scanning
 * an uint_least32_t from octal form.
 */
#define SCNoLEAST32  SCNo32

/**
 * %-code, excluding the %, for scanning
 * an uint_least64_t from octal form.
 */
#define SCNoLEAST64  SCNo64


/**
 * %-code, excluding the %, for scanning
 * an uint_fast8_t from octal form.
 */
#define SCNoFAST8  __SCNFAST8 "o"

/**
 * %-code, excluding the %, for scanning
 * an uint_fast16_t from octal form.
 */
#define SCNoFAST16  __SCNFAST16 "o"

/**
 * %-code, excluding the %, for scanning
 * an uint_fast32_t from octal form.
 */
#define SCNoFAST32  __SCNFAST32 "o"

/**
 * %-code, excluding the %, for scanning
 * an uint_fast64_t from octal form.
 */
#define SCNoFAST64  __SCNFAST64 "o"



/**
 * %-code, excluding the %, for scanning
 * an uint8_t from decimal form.
 */
#define SCNu8  __SCN8 "u"

/**
 * %-code, excluding the %, for scanning
 * an uint16_t from decimal form.
 */
#define SCNu16  __SCN16 "u"

/**
 * %-code, excluding the %, for scanning
 * an uint32_t from decimal form.
 */
#define SCNu32  __SCN32 "u"

/**
 * %-code, excluding the %, for scanning
 * an uint64_t from decimal form.
 */
#define SCNu64  __SCN64 "u"


/**
 * %-code, excluding the %, for scanning
 * an uint_least8_t from decimal form.
 */
#define SCNuLEAST8  SCNu8

/**
 * %-code, excluding the %, for scanning
 * an uint_least16_t from decimal form.
 */
#define SCNuLEAST16  SCNu16

/**
 * %-code, excluding the %, for scanning
 * an uint_least32_t from decimal form.
 */
#define SCNuLEAST32  SCNu32

/**
 * %-code, excluding the %, for scanning
 * an uint_least64_t from decimal form.
 */
#define SCNuLEAST64  SCNu64


/**
 * %-code, excluding the %, for scanning
 * an uint_fast8_t from decimal form.
 */
#define SCNuFAST8  __SCNFAST8 "u"

/**
 * %-code, excluding the %, for scanning
 * an uint_fast16_t from decimal form.
 */
#define SCNuFAST16  __SCNFAST16 "u"

/**
 * %-code, excluding the %, for scanning
 * an uint_fast32_t from decimal form.
 */
#define SCNuFAST32  __SCNFAST32 "u"

/**
 * %-code, excluding the %, for scanning
 * an uint_fast64_t from decimal form.
 */
#define SCNuFAST64  __SCNFAST64 "u"



/**
 * %-code, excluding the %, for scanning an
 * uint8_t from hexadecimal form.
 */
#define SCNx8  __SCN8 "x"

/**
 * %-code, excluding the %, for scanning an
 * uint16_t from hexadecimal form.
 */
#define SCNx16  __SCN16 "x"

/**
 * %-code, excluding the %, for scanning an
 * uint32_t from hexadecimal form.
 */
#define SCNx32  __SCN32 "x"

/**
 * %-code, excluding the %, for scanning an
 * uint64_t from hexadecimal form.
 */
#define SCNx64  __SCN64 "x"


/**
 * %-code, excluding the %, for scanning an
 * uint_least8_t from hexadecimal form.
 */
#define SCNxLEAST8  SCNx8

/**
 * %-code, excluding the %, for scanning an
 * uint_least16_t from hexadecimal form.
 */
#define SCNxLEAST16  SCNx16

/**
 * %-code, excluding the %, for scanning an
 * uint_least32_t from hexadecimal form.
 */
#define SCNxLEAST32  SCNx32

/**
 * %-code, excluding the %, for scanning an
 * uint_least64_t from hexadecimal form.
 */
#define SCNxLEAST64  SCNx64


/**
 * %-code, excluding the %, for scanning an
 * uint_fast8_t from hexadecimal form.
 */
#define SCNxFAST8  __SCNFAST8 "x"

/**
 * %-code, excluding the %, for scanning an
 * uint_fast16_t from hexadecimal form.
 */
#define SCNxFAST16  __SCNFAST16 "x"

/**
 * %-code, excluding the %, for scanning an
 * uint_fast32_t from hexadecimal form.
 */
#define SCNxFAST32  __SCNFAST32 "x"

/**
 * %-code, excluding the %, for scanning an
 * uint_fast64_t from hexadecimal form.
 */
#define SCNxFAST64  __SCNFAST64 "x"



/**
 * %-code, excluding the %, for scanning an
 * intmax_t from decimal form.
 */
#define SCNdMAX __SCNMAX "d"

/**
 * %-code, excluding the %, for scanning an
 * intmax_t from decimal form.
 */
#define SCNiMAX __SCNMAX "i"

/**
 * %-code, excluding the %, for scanning an
 * uintmax_t from octal form.
 */
#define SCNoMAX __SCNMAX "o"

/**
 * %-code, excluding the %, for scanning an
 * uintmax_t from decimal form.
 */
#define SCNuMAX __SCNMAX "u"

/**
 * %-code, excluding the %, for scanning an
 * uintmax_t from hexadecimal form.
 */
#define SCNxMAX __SCNMAX "x"



/**
 * %-code, excluding the %, for scanning
 * an intptr_t, ptrdiff_t, or ssize_t
 * from decimal form.
 */
#define SCNdPTR __SCNPTR "d"

/**
 * %-code, excluding the %, for scanning
 * an intptr_t, ptrdiff_t, or ssize_t
 * from decimal form.
 */
#define SCNiPTR __SCNPTR "i"

/**
 * %-code, excluding the %, for scanning
 * an uintptr_t, uptrdiff_t, or size_t
 * from octal form.
 */
#define SCNoPTR __SCNPTR "o"

/**
 * %-code, excluding the %, for scanning
 * an uintptr_t, uptrdiff_t, or size_t
 * from decimal form.
 */
#define SCNuPTR __SCNPTR "u"

/**
 * %-code, excluding the %, for scanning
 * an uintptr_t, uptrdiff_t, or size_t
 * from hexadecimal form.
 */
#define SCNxPTR __SCNPTR "x"


#endif