Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
lektor
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Kubat
lektor
Requêtes de fusion
!101
Corrections
Code
Examiner les modifications
Extraire la branche
Télécharger
Correctifs
Diff brut
Étendre la barre latérale
Fusionnées
Corrections
dev-kubat
vers
master
Vue d'ensemble
0
Validations
4
Pipelines
0
Modifications
9
Fusionnées
Kubat
a demandé de fusionner
dev-kubat
vers
master
Il y a 5 ans
Vue d'ensemble
0
Validations
4
Pipelines
0
Modifications
9
Endianes and populate/rescan corrections
0
0
Rapports de requête de fusion
Comparer
master
master (base)
et
dernière version
dernière version
b4656680
4 validations,
Il y a 5 ans
9 files
+
117
−
104
En ligne
Comparer les modifications
Côte à côte
En ligne
Afficher les modifications des espaces
Afficher un fichier à la fois
Fichiers
9
inc/common/common.h
+
13
−
16
Afficher le fichier @ b4656680
Modifier dans l'éditeur de fichier unique
Ouvrir dans Web EDI
Afficher le fichier complet
@@ -4,11 +4,6 @@
#include
<unistd.h>
#include
<stdint.h>
/* May be usefull (gcc, see something else for clang):
__FLOAT_WORD_ORDER__
__ORDER_LITTLE_ENDIAN__
__ORDER_BIG_ENDIAN__ */
#define not_implemented() __not_implemented(__func__,__FILE__,__LINE__)
extern
void
__not_implemented
(
const
char
*
func
,
char
*
file
,
int
line
);
@@ -22,24 +17,26 @@ void *safe_zero_malloc(size_t size);
int
is_utf8
(
const
char
*
string
);
/* Same as `be_uint64_t` but for Big-endian doubles. The result is a
correct endian number. Restriction: bytes must be of length 8.
Use the be_uint64_t defined function. */
double
be_double_t
(
const
uint8_t
bytes
[]);
/* Same as `be_double_t` but for floats. Restriction: bytes must
be of length 4. The result is a correct endian number Use the
be_uint32_t defined function. */
float
be_float_t
(
const
uint8_t
bytes
[]);
/* Read `bytes` as the big endian representation of a 32-bit unsigned integer.
`n` is the number of bytes in `bytes`
`n` is the number of bytes in `bytes`
. The result is a 'correct'-endian.
Returns 0 if n is 0.
Restriction: n <= 4 */
uint32_t
be_uint32_t
(
const
uint8_t
bytes
[],
size_t
n
);
/* Same as `be_uint32_t` but for 64-bit unsigned integers.
Restriction: n <= 8 */
/* Same as `be_uint32_t` but for 64-bit unsigned integers.
The result is a
'correct'-endian.
Restriction: n <= 8 */
uint64_t
be_uint64_t
(
const
uint8_t
bytes
[],
size_t
n
);
/* Same as `be_uint64_t` but for Big-endian doubles.
Restriction: bytes must be of length 8. */
double
be_double_t
(
const
uint8_t
bytes
[]);
/* Same as `be_double_t` but for floats. Restriction: bytes must
be of length 4. */
float
be_float_t
(
const
uint8_t
bytes
[]);
/* Trim the string `str` of the char `c` from the right and the left.
The string may not be null terminated.
Returns a pointer to the the trimmed string
Chargement en cours