View | Details | Raw Unified | Return to bug 195929 | Differences between
and this patch

Collapse All | Expand All

(-)extern.h (-1 / +1 lines)
Lines 53-56 Link Here
53
int	 lastline(void);
53
int	 lastline(void);
54
void	 process(void);
54
void	 process(void);
55
void	 resetstate(void);
55
void	 resetstate(void);
56
char	*strregerror(int, regex_t *);
56
const char	*strregerror(int, const regex_t *);
(-)main.c (-7 / +7 lines)
Lines 73-79 Link Here
73
struct s_compunit {
73
struct s_compunit {
74
	struct s_compunit *next;
74
	struct s_compunit *next;
75
	enum e_cut {CU_FILE, CU_STRING} type;
75
	enum e_cut {CU_FILE, CU_STRING} type;
76
	char *s;			/* Pointer to string or fname */
76
	const char *s;			/* Pointer to string or fname */
77
};
77
};
78
78
79
/*
79
/*
Lines 86-92 Link Here
86
 * Linked list of files to be processed
86
 * Linked list of files to be processed
87
 */
87
 */
88
struct s_flist {
88
struct s_flist {
89
	char *fname;
89
	const char *fname;
90
	struct s_flist *next;
90
	struct s_flist *next;
91
};
91
};
92
92
Lines 117-124 Link Here
117
static const char *inplace;	/* Inplace edit file extension. */
117
static const char *inplace;	/* Inplace edit file extension. */
118
u_long linenum;
118
u_long linenum;
119
119
120
static void add_compunit(enum e_cut, char *);
120
static void add_compunit(enum e_cut, const char *);
121
static void add_file(char *);
121
static void add_file(const char *);
122
static void usage(void);
122
static void usage(void);
123
123
124
int
124
int
Lines 219-225 Link Here
219
{
214
{
220
	static enum {ST_EOF, ST_FILE, ST_STRING} state = ST_EOF;
215
	static enum {ST_EOF, ST_FILE, ST_STRING} state = ST_EOF;
221
	static FILE *f;		/* Current open file */
216
	static FILE *f;		/* Current open file */
222
	static char *s;		/* Current pointer inside string */
217
	static const char *s;	/* Current pointer inside string */
223
	static char string_ident[30];
218
	static char string_ident[30];
224
	char *p;
219
	char *p;
225
220
Lines 452-458 Link Here
452
 * Add a compilation unit to the linked list
447
 * Add a compilation unit to the linked list
453
 */
448
 */
454
static void
449
static void
455
add_compunit(enum e_cut type, char *s)
450
add_compunit(enum e_cut type, const char *s)
456
{
451
{
457
	struct s_compunit *cu;
452
	struct s_compunit *cu;
458
453
Lines 469-475 Link Here
469
 * Add a file to the linked list
464
 * Add a file to the linked list
470
 */
465
 */
471
static void
466
static void
472
add_file(char *s)
467
add_file(const char *s)
473
{
468
{
474
	struct s_flist *fp;
469
	struct s_flist *fp;
475
470
(-)misc.c (-2 / +2 lines)
Lines 55-62 Link Here
55
 * because of the silly semantics of regerror (we can never know the size of
55
 * because of the silly semantics of regerror (we can never know the size of
56
 * the buffer).
56
 * the buffer).
57
 */
57
 */
58
char *
58
const char *
59
strregerror(int errcode, regex_t *preg)
59
strregerror(int errcode, const regex_t *preg)
60
{
60
{
61
	static char *oe;
61
	static char *oe;
62
	size_t s;
62
	size_t s;

Return to bug 195929