-/* Returns the identifier of file HANDLE. If HANDLE was created
- by referring to a file name instead of a handle name, returns
- the file name, enclosed in double quotes. Return value is
- owned by the file handle.
+/* Returns the identifier that may be used in syntax to name the
+ given HANDLE, which takes the form of a PSPP identifier. If
+ HANDLE has no identifier, returns a null pointer.
+
+ Return value is owned by the file handle.*/
+const char *
+fh_get_id (const struct file_handle *handle)
+{
+ return handle->id[0] != '\0' ? handle->id : NULL;
+}
+
+/* Returns a user-friendly string to identify the given HANDLE.
+ If HANDLE was created by referring to a file name, returns the
+ file name, enclosed in double quotes. Return value is owned
+ by the file handle.