X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fgetl.c;h=9db6c3ae56260d3be735efd45588622b4eb2077b;hb=afdf3096926b561f4e6511c10fcf73fc6796b9d2;hp=dc69f11a12a2b45e9ecf77c5dd89a00e5c69e18e;hpb=d0b91eae59319ab2756d0d43b9cb15eb9cd3c234;p=pspp-builds.git diff --git a/src/libpspp/getl.c b/src/libpspp/getl.c index dc69f11a..9db6c3ae 100644 --- a/src/libpspp/getl.c +++ b/src/libpspp/getl.c @@ -24,6 +24,7 @@ #include "libpspp/str.h" #include "libpspp/string-array.h" +#include "gl/configmake.h" #include "gl/relocatable.h" #include "gl/xalloc.h" @@ -211,18 +212,18 @@ getl_source_name (const struct source_stream *ss) return s->interface->name (s->interface); } -/* Returns the location within the current source, or -1 if there is - no current source */ +/* Returns the line number within the current source, or 0 if there is no + current source. */ int getl_source_location (const struct source_stream *ss) { const struct getl_source *s = current_source (ss); if ( ll_is_empty (&ss->sources) ) - return -1; + return 0; if ( !s->interface->location ) - return -1; + return 0; return s->interface->location (s->interface); }