X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fgetl.c;h=9db6c3ae56260d3be735efd45588622b4eb2077b;hb=afdf3096926b561f4e6511c10fcf73fc6796b9d2;hp=43d2a56f460d8f645a61ee86dc5e457c862a9efc;hpb=f550aee00a62fe1d8baf62d83cd7efef6cc2ee92;p=pspp-builds.git diff --git a/src/libpspp/getl.c b/src/libpspp/getl.c index 43d2a56f..9db6c3ae 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); }