function [ppdir,bsfs] = getppdir
% Function GETPPDIR
%
%    [ppdir,bsfs] = getppdir
%
%    GETPPDIR returns the directory containing the pepperpot data, based
%    upon the system in use.  This assumes that the pepperpot directory on
%    a Windows machine is "E:\pepperpot" and on a Mac is
%    "/Volumes/FAT32/pepperpot".
%
%    [PPDIR] = GETPPDIR returns a string, PPDIR, containing the pepperpot
%    directory information.
%
%    [PPDIR,BSFS] = GETPPDIR also returns a string, BSFS, with a forward
%    slash or backslash, depending on the system type, to enable correct
%    file referencing.

    if nargout > 2
        error('Can only specify two output argument: [ppdir,bsfs] = getppdir') ;
    end

    comptype = computer ;
    curdir = cd ;
    bsfs = filesep ;

    if isunix
        [status hostname] = system('hostname | cut -d . -f1') ;
        hostname(end) = [] ;
        switch hostname
            case ('heppc53')
                ppdir = ('/Volumes/FAT32/pepperpot') ;
            otherwise
                ppdir = (curdir) ;
        end
    elseif ispc
        cd('C:\') ;
        [status hostname] = system('hostname') ;
        hostname(end) = [] ;
        switch hostname
            case ('heppc230')
                ppdir = ('E:\pepperpot') ;
            case ('NDW250')
                ppdir = ('D:\pepperpot') ;
            case ('jollymac')
                ppdir = ('C:\pepperpot') ;
            otherwise
                ppdir = (curdir) ;
        end
        cd(curdir) ;
    else
        ppdir = ('Unknown') ;
    end

%    if nargout < 1
%        disp(' ')
%        disp(['Pepperpot directory is ' ppdir]) ;
%        disp(' ')
%    end

    return