Index: /issm/trunk-jpl/src/m/os/oshostname.m
===================================================================
--- /issm/trunk-jpl/src/m/os/oshostname.m	(revision 20441)
+++ /issm/trunk-jpl/src/m/os/oshostname.m	(revision 20442)
@@ -1,25 +1,20 @@
 function hostname=oshostname()
-%OSHOSTNAME figure out hostname, irrespective of os type
+%OSHOSTNAME - Determine hostname, irrespective of os type
 %
-%   usage: hostname=oshostname();
-%
-%
+%   Usage:
+%      hostname=oshostname();
 
-if ispc(),
-	[status,hostname]=system('hostname');
-	if status, 
-		error('oshostname error message: could not run hostname command on windows os');
-	end
+% Find computer name from environment
+if ispc
+	hostname = getenv('COMPUTERNAME');
 else
-	%See http://www.mathworks.com/help/matlab/ref/system.html "tips" section
-	%We need to add < /dev/null otherwise what is in the clipboard is added
-	[status,hostname]=system('hostname < /dev/null');
-	hostname = strrep(hostname,'-','');
-	if status, 
-		error('oshostname error message: could not run hostname command on *nix os');
-	end
+	hostname = getenv('HOSTNAME');
 end
 
-%remove carriage return and blank spaces
-hostname=hostname(1:end-1);
-hostname=ddewhite(hostname);
+% Take out minus signs
+hostname = strrep(hostname,'-','');
+
+% Check that machine name is not empty
+if isempty(hostname),
+	error('Cannot determine machine name');
+end
Index: sm/trunk-jpl/src/m/string/ddewhite.m
===================================================================
--- /issm/trunk-jpl/src/m/string/ddewhite.m	(revision 20441)
+++ 	(revision )
@@ -1,30 +1,0 @@
-function sout = ddewhite(s)
-%DDEWHITE Double dewhite. Strip both leading and trailing whitespace.
-%
-%   DDEWHITE(S) removes leading and trailing white space and any null
-%   characters from the string S.  A null character is one that has an absolute
-%   value of 0.
-%
-%   See also DEWHITE, DEBLANK, DDEBLANK.
-
-%   Author:      Peter J. Acklam
-%   Time-stamp:  2003-10-13 11:12:57 +0200
-%   E-mail:      pjacklam@online.no
-%   URL:         http://home.online.no/~pjacklam
-
-   error(nargchk(1, 1, nargin));
-   if ~ischar(s)
-      error('Input must be a string (char array).');
-   end
-
-   if isempty(s)
-      sout = s;
-      return;
-   end
-
-   [r, c] = find(~isspace(s));
-   if size(s, 1) == 1
-      sout = s(min(c) : max(c));
-   else
-      sout = s(:, min(c) : max(c));
-   end
