1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 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
|
Description: rename type definition to Bool.
The type bool is part of the C language since the specification 2023.
Its redefinition provokes build failures like:
.
types.h:7:13: error: ‘bool’ cannot be defined via ‘typedef’
7 | typedef int bool;
| ^~~~
types.h:7:13: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
.
The original code bases its type on "int", which is larger than the one
byte size of the standardized bool type, therefore, a proper fix to
preserve the legacy behavior is rename the type to Bool.
Author: Étienne Mollier <emollier@debian.org>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1097885
Forwarded: no
Last-Update: 2025-10-06
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- sim4.orig/args.c
+++ sim4/args.c
@@ -28,7 +28,7 @@
}
/* get_argval --------------------- get the value of a command-line argument */
-bool get_argval(int c, int *val_ptr)
+Bool get_argval(int c, int *val_ptr)
{
int i;
@@ -42,7 +42,7 @@
}
/* get_fargval --------------- get the float value of a command-line argument */
-bool get_fargval(int c, double *val_ptr)
+Bool get_fargval(int c, double *val_ptr)
{
int i;
@@ -56,7 +56,7 @@
}
/* get_strargval ---------- get the string value of a command-line argument */
-bool get_strargval(int c, char **val_ptr)
+Bool get_strargval(int c, char **val_ptr)
{
int i;
@@ -70,7 +70,7 @@
return 0;
}
-bool get_cargval(int c, char **valp)
+Bool get_cargval(int c, char **valp)
{
int i;
--- sim4.orig/args.h
+++ sim4/args.h
@@ -10,10 +10,10 @@
int V;
} argv_scores_t;
-bool get_argval(int, int *);
-bool get_fargval(int, double *);
-bool get_strargval(int, char **);
-bool get_cargval(int, char **);
+Bool get_argval(int, int *);
+Bool get_fargval(int, double *);
+Bool get_strargval(int, char **);
+Bool get_cargval(int, char **);
void ckargs(const char *, int , char **, int );
void fprintf_argv(FILE* fp);
void ck_argc(const char *);
--- sim4.orig/discrim.c
+++ sim4/discrim.c
@@ -16,7 +16,7 @@
static int is_dchar(int ch);
-bool is_DNA(uchar *s, int len)
+Bool is_DNA(uchar *s, int len)
{
int ACGT, i;
--- sim4.orig/discrim.h
+++ sim4/discrim.h
@@ -2,6 +2,6 @@
#define SIM_DISCRIM_H
/* $Id: discrim.h,v 1.1 2000/06/05 22:23:15 florea Exp $ */
-bool is_DNA(uchar *s, int len);
+Bool is_DNA(uchar *s, int len);
#endif
--- sim4.orig/misc.c
+++ sim4/misc.c
@@ -123,7 +123,7 @@
}
/* strsame --------------------------- tell whether two strings are identical */
-bool same_string(const char *s, const char *t)
+Bool same_string(const char *s, const char *t)
{
return (strcmp(s, t) == 0);
}
--- sim4.orig/misc.h
+++ sim4/misc.h
@@ -23,7 +23,7 @@
/*@only@*/ void *ckalloc(size_t amount);
/*@only@*/ void *ckallocz(size_t amount);
void *ckfree(void *p);
-bool same_string(const char *s, const char *t);
+Bool same_string(const char *s, const char *t);
char *copy_string(const char *s);
char *copy_substring(const char *s, int n);
long ckftell(FILE*);
--- sim4.orig/sim4b1.c
+++ sim4/sim4b1.c
@@ -44,7 +44,7 @@
static Exon_ptr exon_list;
static void merge(Exon **,Exon **);
-static bool get_sync_flag(Exon *, Exon *, int);
+static Bool get_sync_flag(Exon *, Exon *, int);
static void slide_intron(int w, Exon **,uchar *,uchar *);
static void sync_slide_intron(int w, Exon **,uchar *,uchar *);
static void wobble(Exon **,Exon **,const char *,const char *,uchar *seq1);
@@ -75,7 +75,7 @@
static void relink(Msp_ptr *,int,int,int,int,int,uchar *,uchar *);
static int dispatch_find_ends(int,int,int *,int *,edit_script_list *,int,int,int);
static int find_ends(edit_script_list *,int);
-static bool get_match_quality(Exon *,Exon *,sim4_stats_t *,int);
+static Bool get_match_quality(Exon *,Exon *,sim4_stats_t *,int);
static int check_consistency_intron_ori(Exon *,int,char *);
Exon *find_previous(Exon *,Exon *);
@@ -102,7 +102,7 @@
{
int cflag, diff, cost, rollbflag, sync_flag;
int u, v, I, J;
- bool good_match;
+ Bool good_match;
Exon *Lblock, *Rblock=NULL, *tmp_block, *last, *prev, *tmp_block1,
*tmp_Lblock=NULL, *tmp_Rblock=NULL, *new;
@@ -2701,7 +2701,7 @@
}
}
-static bool get_sync_flag(Exon *lblock, Exon *rblock, int w)
+static Bool get_sync_flag(Exon *lblock, Exon *rblock, int w)
{
int numx=0, e2;
Exon *t;
@@ -3078,10 +3078,10 @@
return t;
}
-static bool get_match_quality(Exon *lblock, Exon *rblock, sim4_stats_t *st, int N)
+static Bool get_match_quality(Exon *lblock, Exon *rblock, sim4_stats_t *st, int N)
{
int tcov;
- bool good_match;
+ Bool good_match;
Exon *t;
good_match = TRUE; st->icoverage = 0;
--- sim4.orig/types.h
+++ sim4/types.h
@@ -4,7 +4,7 @@
#define NACHARS 128
-typedef int bool;
+typedef int Bool;
typedef int ss_t[NACHARS][NACHARS];
typedef unsigned char uchar;
|