diff scripts/pkg/private/get_description.m @ 14467:ec7ab7e37731

maint: Remove redundant private functions from pkg/private. * pkg/private/rstrip.m: remove file * pkg/private/strip.m: remove file * pkg/private/split_by.m: remove file * pkg/private/get_description.m: replace rstrip with deblank and strip with strtrim * pkg/private/fix_depends.m: replace rstrip with deblanak, strip with strtrim and split_by with strstrip (strsplit ()) * pkg/private/generate_llokfor_cache.m: replace split_by with strsplit (strtrim ())
author Carlo de Falco <kingcrimson@tiscali.it>
date Thu, 15 Mar 2012 19:44:13 +0100
parents cfb0173fe1ca
children a46b8b0bd325
line wrap: on
line diff
--- a/scripts/pkg/private/get_description.m
+++ b/scripts/pkg/private/get_description.m
@@ -38,7 +38,7 @@
     elseif (isspace(line(1)))
       ## Continuation lines
       if (exist ("keyword", "var") && isfield (desc, keyword))
-        desc.(keyword) = cstrcat (desc.(keyword), " ", rstrip(line));
+        desc.(keyword) = cstrcat (desc.(keyword), " ", deblank (line));
       endif
     else
       ## Keyword/value pair
@@ -47,8 +47,8 @@
         disp ("skipping line");
       else
         colon = colon(1);
-        keyword = tolower (strip (line(1:colon-1)));
-        value = strip (line (colon+1:end));
+        keyword = tolower (strtrim (line(1:colon-1)));
+        value = strtrim (line (colon+1:end));
         if (length (value) == 0)
             fclose (fid);
             error ("The keyword `%s' of the package `%s' has an empty value",