Lines 1-6
Link Here
|
1 |
/*- |
1 |
/*- |
2 |
* SPDX-License-Identifier: BSD-3-Clause |
2 |
* SPDX-License-Identifier: BSD-3-Clause |
3 |
* |
3 |
* |
|
|
4 |
* Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> |
4 |
* Copyright 2014 Garrett D'Amore <garrett@damore.org> |
5 |
* Copyright 2014 Garrett D'Amore <garrett@damore.org> |
5 |
* Copyright 2010 Nexenta Systems, Inc. All rights reserved. |
6 |
* Copyright 2010 Nexenta Systems, Inc. All rights reserved. |
6 |
* Copyright (c) 1989, 1993 |
7 |
* Copyright (c) 1989, 1993 |
Lines 374-387
Link Here
|
374 |
size_t len; |
375 |
size_t len; |
375 |
char *p; |
376 |
char *p; |
376 |
int getout; |
377 |
int getout; |
|
|
378 |
char *bfmt; |
377 |
|
379 |
|
378 |
p = strdup(getstr()); |
380 |
if (((bfmt = strdup(start)) == NULL) || |
379 |
if (p == NULL) { |
381 |
((p = strdup(getstr())) == NULL)) { |
380 |
warnx("%s", strerror(ENOMEM)); |
382 |
warnx("%s", strerror(ENOMEM)); |
381 |
return (NULL); |
383 |
return (NULL); |
382 |
} |
384 |
} |
|
|
385 |
/* Convert "b" to "s" for output. */ |
386 |
bfmt[strlen(bfmt) - 1] = 's'; |
383 |
getout = escape(p, 0, &len); |
387 |
getout = escape(p, 0, &len); |
384 |
fputs(p, stdout); |
388 |
PF(bfmt, p); |
|
|
389 |
|
390 |
free(bfmt); |
385 |
free(p); |
391 |
free(p); |
386 |
if (getout) |
392 |
if (getout) |
387 |
return (end_fmt); |
393 |
return (end_fmt); |