pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] Changes to pspp/src/file-handle.q


From: Ben Pfaff
Subject: [Pspp-cvs] Changes to pspp/src/file-handle.q
Date: Mon, 02 May 2005 02:21:33 -0400

Index: pspp/src/file-handle.q
diff -u pspp/src/file-handle.q:1.17 pspp/src/file-handle.q:1.18
--- pspp/src/file-handle.q:1.17 Fri Apr 29 01:02:14 2005
+++ pspp/src/file-handle.q      Mon May  2 06:21:20 2005
@@ -73,7 +73,7 @@
   struct file_handle *iter;
 
   for (iter = file_handles; iter != NULL; iter = iter->next)
-    if (!strcmp (handle_name, iter->name))
+    if (!strcasecmp (handle_name, iter->name))
       return iter;
   return NULL;
 }
@@ -109,22 +109,21 @@
 int
 cmd_file_handle (void)
 {
-  char handle_name[9];
+  char handle_name[LONG_NAME_LEN + 1];
 
   struct cmd_file_handle cmd;
   struct file_handle *handle;
 
   if (!lex_force_id ())
     return CMD_FAILURE;
-  strcpy (handle_name, tokid);
+  st_trim_copy (handle_name, tokid, sizeof handle_name);
 
   handle = get_handle_with_name (handle_name);
   if (handle != NULL)
     {
-      msg (SE, _("File handle %s already refers to "
-                "file %s.  File handle cannot be redefined within a "
-                 "session."),
-          tokid, handle->filename);
+      msg (SE, _("File handle %s already refers to file %s.  "
+                 "File handles cannot be redefined within a session."),
+          handle_name, handle->filename);
       return CMD_FAILURE;
     }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]