include: Move sarg.c stuff to nsc.h to avoid incomplete enum

Portability issue: prototypes.h uses enum ns_seltype, defined in
nsc.h.  GCC is fine with that; it supports incomplete enum types as an
extension.  Broken in commit 157ae8ec2 "Clean up superfluous include
of nsc.h in prototypes.h", v4.3.27.  Moving sarg.c stuff to nsc.h
fixes it.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2020-12-30 17:04:12 +01:00
parent a0d1f63729
commit c48abacad2
2 changed files with 8 additions and 6 deletions

View file

@ -28,7 +28,7 @@
*
* Known contributors to this file:
* Dave Pare, 1989
* Markus Armbruster, 2004-2016
* Markus Armbruster, 2004-2020
*/
#ifndef NSC_H
@ -319,6 +319,12 @@ extern void nsc_init(void);
extern int nxtitem(struct nstr_item *, void *);
/* src/lib/subs/nxtsct.c */
extern int nxtsct(struct nstr_sect *, struct sctstr *);
/* src/lib/subs/sarg.c */
extern enum ns_seltype sarg_type(char *);
extern int sarg_xy(char *, coord *, coord *);
extern int sarg_area(char *, struct range *);
extern int sarg_range(char *, coord *, coord *, int *);
extern int sarg_list(char *, int *, int);
/* src/lib/subs/snxtitem.c */
extern int snxtitem(struct nstr_item *, int, char *, char *);
extern void snxtitem_area(struct nstr_item *, int, struct range *);