Changeset 125


Ignore:
Timestamp:
08/31/11 12:09:03 (22 months ago)
Author:
joseba
Message:

Added the no supported options in the errors.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/pspio_error.c

    r120 r125  
    125125    case PSPIO_ENOMEM: 
    126126      return "malloc failed"; 
     127    case PSPIO_NOSUPPORT: 
     128      return "No supported option in the pseudo-potential file"; 
    127129    default: 
    128130      return "unknown error code" ; 
  • trunk/src/pspio_error.h

    r115 r125  
    4343#define PSPIO_EGSL  6 
    4444#define PSPIO_ENOMEM 7 
    45  
     45#define PSPIO_ENOSUPPORT 8 
    4646 
    4747/********************************************************************** 
  • trunk/src/read_upf.c

    r123 r125  
    6666  narg = sscanf (line, "%2c",&kind_ps[0]); // read the kind of pseudo-potentials US|NC|PAW    "Ultrasoft|Norm conserving|Projector-augmented"  
    6767  PSPIO_ASSERT(narg==1, PSPIO_EIO);      
     68  //LIBPSP_IO can only read norm-conserving pseudo-potentials from UPF format. 
    6869  if (!strncpm(kind_ps,"NC",2)) { 
    69     printf("LIBPSP_IO can only read norm-conserving pseudo-potentials from UPF format."); 
    70     return PSPIO_ETYPE; 
    71   } 
    72          
     70    HANDLE_ERROR(PSPIO_ENOSUPPORT); 
     71  } 
     72   
    7373  if(fgets(line, MAX_STRLEN, fp) == NULL) { 
    7474    HANDLE_ERROR(PSPIO_EIO); 
Note: See TracChangeset for help on using the changeset viewer.