Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
3b8ef8a8
Commit
3b8ef8a8
authored
1 year ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
Resolve warnings about ignored return values
As reported by GCC 10.2 with FORTIFY=1 and SANITIZE=1
parent
4296310a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/syncterm/syncterm.c
+3
-3
3 additions, 3 deletions
src/syncterm/syncterm.c
src/syncterm/term.c
+22
-21
22 additions, 21 deletions
src/syncterm/term.c
with
25 additions
and
24 deletions
src/syncterm/syncterm.c
+
3
−
3
View file @
3b8ef8a8
...
...
@@ -1198,7 +1198,8 @@ get_syncterm_filename(char *fn, int fnlen, int type, bool shared)
if
(
!
shared
)
{
if
(((
home
==
NULL
)
||
(
strlen
(
home
)
>
MAX_PATH
-
32
)))
{
/* $HOME just too damn big */
if
((
type
==
SYNCTERM_DEFAULT_TRANSFER_PATH
)
||
(
type
==
SYNCTERM_PATH_CACHE
))
{
getcwd
(
fn
,
fnlen
);
if
(
getcwd
(
fn
,
fnlen
)
==
NULL
)
return
NULL
;
backslash
(
fn
);
if
(
type
==
SYNCTERM_PATH_CACHE
)
{
strcat
(
fn
,
"cache"
);
...
...
@@ -1539,8 +1540,7 @@ main(int argc, char **argv)
"
\t
cols#132,lines#60,use=syncterm-bitmap,
\n
"
;
if
((
argc
==
2
)
&&
(
strcmp
(
argv
[
1
],
"-T"
)
==
0
))
{
write
(
STDOUT_FILENO
,
syncterm_termcap
,
strlen
(
syncterm_termcap
));
return
0
;
return
write
(
STDOUT_FILENO
,
syncterm_termcap
,
strlen
(
syncterm_termcap
))
>
0
?
EXIT_SUCCESS
:
EXIT_FAILURE
;
}
if
((
argc
==
2
)
&&
(
strcmp
(
argv
[
1
],
"-v"
)
==
0
))
{
fprintf
(
stdout
,
"%s
\n
"
,
syncterm_version
);
...
...
This diff is collapsed.
Click to expand it.
src/syncterm/term.c
+
22
−
21
View file @
3b8ef8a8
...
...
@@ -62,24 +62,24 @@ static struct ciolib_pixels *pixmap_buffer[2];
static
struct
ciolib_mask
*
mask_buffer
;
static
uint8_t
pnm_gamma
[
256
]
=
{
0
,
13
,
22
,
28
,
34
,
38
,
42
,
46
,
50
,
53
,
56
,
59
,
61
,
64
,
66
,
69
,
71
,
73
,
75
,
77
,
79
,
81
,
83
,
85
,
86
,
88
,
90
,
92
,
93
,
95
,
96
,
98
,
99
,
101
,
102
,
104
,
105
,
106
,
108
,
109
,
110
,
112
,
113
,
114
,
115
,
117
,
118
,
119
,
120
,
121
,
122
,
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
,
148
,
149
,
150
,
151
,
152
,
153
,
154
,
155
,
155
,
156
,
157
,
158
,
159
,
159
,
160
,
161
,
162
,
163
,
163
,
164
,
165
,
166
,
167
,
167
,
168
,
169
,
170
,
170
,
171
,
172
,
173
,
173
,
174
,
175
,
175
,
176
,
177
,
178
,
178
,
179
,
180
,
180
,
181
,
182
,
182
,
183
,
184
,
185
,
185
,
186
,
187
,
187
,
188
,
189
,
189
,
190
,
190
,
191
,
192
,
192
,
193
,
194
,
194
,
195
,
196
,
196
,
197
,
197
,
198
,
199
,
199
,
200
,
200
,
201
,
202
,
202
,
203
,
203
,
204
,
205
,
205
,
206
,
206
,
207
,
208
,
208
,
209
,
209
,
210
,
210
,
211
,
212
,
212
,
213
,
213
,
214
,
214
,
215
,
215
,
216
,
216
,
217
,
218
,
218
,
219
,
219
,
220
,
220
,
221
,
221
,
222
,
222
,
223
,
223
,
224
,
224
,
225
,
226
,
226
,
227
,
227
,
228
,
228
,
229
,
229
,
230
,
230
,
231
,
231
,
232
,
232
,
233
,
233
,
234
,
234
,
235
,
235
,
236
,
236
,
237
,
237
,
238
,
238
,
238
,
239
,
239
,
240
,
240
,
241
,
241
,
242
,
242
,
243
,
243
,
244
,
244
,
245
,
245
,
246
,
246
,
246
,
247
,
247
,
248
,
248
,
249
,
249
,
250
,
250
,
251
,
251
,
251
,
252
,
252
,
253
,
253
,
254
,
71
,
73
,
75
,
77
,
79
,
81
,
83
,
85
,
86
,
88
,
90
,
92
,
93
,
95
,
96
,
98
,
99
,
101
,
102
,
104
,
105
,
106
,
108
,
109
,
110
,
112
,
113
,
114
,
115
,
117
,
118
,
119
,
120
,
121
,
122
,
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
,
148
,
149
,
150
,
151
,
152
,
153
,
154
,
155
,
155
,
156
,
157
,
158
,
159
,
159
,
160
,
161
,
162
,
163
,
163
,
164
,
165
,
166
,
167
,
167
,
168
,
169
,
170
,
170
,
171
,
172
,
173
,
173
,
174
,
175
,
175
,
176
,
177
,
178
,
178
,
179
,
180
,
180
,
181
,
182
,
182
,
183
,
184
,
185
,
185
,
186
,
187
,
187
,
188
,
189
,
189
,
190
,
190
,
191
,
192
,
192
,
193
,
194
,
194
,
195
,
196
,
196
,
197
,
197
,
198
,
199
,
199
,
200
,
200
,
201
,
202
,
202
,
203
,
203
,
204
,
205
,
205
,
206
,
206
,
207
,
208
,
208
,
209
,
209
,
210
,
210
,
211
,
212
,
212
,
213
,
213
,
214
,
214
,
215
,
215
,
216
,
216
,
217
,
218
,
218
,
219
,
219
,
220
,
220
,
221
,
221
,
222
,
222
,
223
,
223
,
224
,
224
,
225
,
226
,
226
,
227
,
227
,
228
,
228
,
229
,
229
,
230
,
230
,
231
,
231
,
232
,
232
,
233
,
233
,
234
,
234
,
235
,
235
,
236
,
236
,
237
,
237
,
238
,
238
,
238
,
239
,
239
,
240
,
240
,
241
,
241
,
242
,
242
,
243
,
243
,
244
,
244
,
245
,
245
,
246
,
246
,
246
,
247
,
247
,
248
,
248
,
249
,
249
,
250
,
250
,
251
,
251
,
251
,
252
,
252
,
253
,
253
,
254
,
254
,
255
,
255
};
uint8_t
pnm_gamma_max
=
255
;
...
...
@@ -2034,7 +2034,8 @@ xmodem_download(struct bbslist *bbs, long mode, char *path)
if
(
file_bytes
<
(
ulong
)
filelength
(
fileno
(
fp
)))
{
lprintf
(
LOG_INFO
,
"Truncating file to %lu bytes"
,
(
ulong
)
file_bytes
);
chsize
(
fileno
(
fp
),
(
ulong
)
file_bytes
);
/* 4GB limit! */
if
(
chsize
(
fileno
(
fp
),
(
ulong
)
file_bytes
)
!=
0
)
/* 4GB limit! */
lprintf
(
LOG_ERR
,
"Error %d (%s) truncating file"
,
errno
,
strerror
(
errno
));
}
else
{
file_bytes
=
filelength
(
fileno
(
fp
));
...
...
@@ -2449,11 +2450,11 @@ buildBt709ToSrgbGamma(const uint8_t maxval) {
*/
uint8_t
const
linearCutoff709
=
(
uint8_t
)
(
maxval
*
0
.
01
8
+
0
.
5
);
double
const
linearCompression709
=
double
const
linearCompression709
=
0
.
01
8
/
(
1
.
099
*
pow
(
0
.
01
8
,
oneOverGamma709
)
-
0
.
099
);
double
const
linearCutoffSrgb
=
0
.
003130
8
;
double
const
linearExpansionSrgb
=
double
const
linearExpansionSrgb
=
(
1
.
055
*
pow
(
0
.
003130
8
,
oneOverGammaSrgb
)
-
0
.
055
)
/
0
.
003130
8
;
int
i
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment