X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fgetl.c;h=9db6c3ae56260d3be735efd45588622b4eb2077b;hb=638a86001fe7a237bd6c19a181d796305290d72a;hp=43d2a56f460d8f645a61ee86dc5e457c862a9efc;hpb=ab662a7bd2b9118befbf4c65785d5762bb1d1899;p=pspp diff --git a/src/libpspp/getl.c b/src/libpspp/getl.c index 43d2a56f46..9db6c3ae56 100644 --- a/src/libpspp/getl.c +++ b/src/libpspp/getl.c @@ -212,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); }