src/spglib.c
SpglibSpacegroupType spg_get_spacegroup_type(const int hall_number)
{
  SpglibSpacegroupType spglibtype;
  SpacegroupType spgtype;
  Pointgroup pointgroup;
  int arth_number;
  char arth_symbol[7];

  spglibtype.number = 0;
  strcpy(spglibtype.schoenflies, "");
  strcpy(spglibtype.hall_symbol, "");
  strcpy(spglibtype.choice, "");
  strcpy(spglibtype.international, "");
  strcpy(spglibtype.international_full, "");
  strcpy(spglibtype.international_short, "");
  strcpy(spglibtype.pointgroup_international, "");
  strcpy(spglibtype.pointgroup_schoenflies, "");
  spglibtype.arithmetic_crystal_class_number = 0;
  strcpy(spglibtype.arithmetic_crystal_class_symbol, "");

  if (0 < hall_number && hall_number < 531) {
    spgtype = spgdb_get_spacegroup_type(hall_number);
    spglibtype.number = spgtype.number;
    memcpy(spglibtype.schoenflies, spgtype.schoenflies, 7);
    memcpy(spglibtype.hall_symbol, spgtype.hall_symbol, 17);
    memcpy(spglibtype.choice, spgtype.choice, 6);
    memcpy(spglibtype.international, spgtype.international, 32);
    memcpy(spglibtype.international_full, spgtype.international_full, 20);
    memcpy(spglibtype.international_short, spgtype.international_short, 11);
    pointgroup = ptg_get_pointgroup(spgtype.pointgroup_number);
    memcpy(spglibtype.pointgroup_international, pointgroup.symbol, 6);
    memcpy(spglibtype.pointgroup_schoenflies, pointgroup.schoenflies, 4);
    arth_number = arth_get_symbol(arth_symbol, spgtype.number);
    spglibtype.arithmetic_crystal_class_number = arth_number;
    memcpy(spglibtype.arithmetic_crystal_class_symbol, arth_symbol, 7);
    spglib_error_code = SPGLIB_SUCCESS;
  } else {
    spglib_error_code = SPGERR_SPACEGROUP_SEARCH_FAILED;
  }

  return spglibtype;
}
/* Return spglibtype.number = 0 if failed */
Return spglibtype.number = 0 if failed
Return spglibtype . number = 0 if failed
SpglibSpacegroupType spg_get_spacegroup_type(const int hall_number)
{
  SpglibSpacegroupType spglibtype;
  SpacegroupType spgtype;
  Pointgroup pointgroup;
  int arth_number;
  char arth_symbol[7];
  spglibtype.number = 0;
  strcpy(spglibtype.schoenflies, "");
  strcpy(spglibtype.hall_symbol, "");
  strcpy(spglibtype.choice, "");
  strcpy(spglibtype.international, "");
  strcpy(spglibtype.international_full, "");
  strcpy(spglibtype.international_short, "");
  strcpy(spglibtype.pointgroup_international, "");
  strcpy(spglibtype.pointgroup_schoenflies, "");
  spglibtype.arithmetic_crystal_class_number = 0;
  strcpy(spglibtype.arithmetic_crystal_class_symbol, "");
  if (0 < hall_number && hall_number < 531) {
    spgtype = spgdb_get_spacegroup_type(hall_number);
    spglibtype.number = spgtype.number;
    memcpy(spglibtype.schoenflies, spgtype.schoenflies, 7);
    memcpy(spglibtype.hall_symbol, spgtype.hall_symbol, 17);
    memcpy(spglibtype.choice, spgtype.choice, 6);
    memcpy(spglibtype.international, spgtype.international, 32);
    memcpy(spglibtype.international_full, spgtype.international_full, 20);
    memcpy(spglibtype.international_short, spgtype.international_short, 11);
    pointgroup = ptg_get_pointgroup(spgtype.pointgroup_number);
    memcpy(spglibtype.pointgroup_international, pointgroup.symbol, 6);
    memcpy(spglibtype.pointgroup_schoenflies, pointgroup.schoenflies, 4);
    arth_number = arth_get_symbol(arth_symbol, spgtype.number);
    spglibtype.arithmetic_crystal_class_number = arth_number;
    memcpy(spglibtype.arithmetic_crystal_class_symbol, arth_symbol, 7);
    spglib_error_code = SPGLIB_SUCCESS;
  } else {
    spglib_error_code = SPGERR_SPACEGROUP_SEARCH_FAILED;
  }
  return spglibtype;
}
SpglibSpacegroupType spg_get_spacegroup_type ( const int hall_number ) { SpglibSpacegroupType spglibtype ; SpacegroupType spgtype ; Pointgroup pointgroup ; int arth_number ; char arth_symbol [ 7 ] ; spglibtype . number = 0 ; strcpy ( spglibtype . schoenflies , " " ) ; strcpy ( spglibtype . hall_symbol , " " ) ; strcpy ( spglibtype . choice , " " ) ; strcpy ( spglibtype . international , " " ) ; strcpy ( spglibtype . international_full , " " ) ; strcpy ( spglibtype . international_short , " " ) ; strcpy ( spglibtype . pointgroup_international , " " ) ; strcpy ( spglibtype . pointgroup_schoenflies , " " ) ; spglibtype . arithmetic_crystal_class_number = 0 ; strcpy ( spglibtype . arithmetic_crystal_class_symbol , " " ) ; if ( 0 < hall_number && hall_number < 531 ) { spgtype = spgdb_get_spacegroup_type ( hall_number ) ; spglibtype . number = spgtype . number ; memcpy ( spglibtype . schoenflies , spgtype . schoenflies , 7 ) ; memcpy ( spglibtype . hall_symbol , spgtype . hall_symbol , 17 ) ; memcpy ( spglibtype . choice , spgtype . choice , 6 ) ; memcpy ( spglibtype . international , spgtype . international , 32 ) ; memcpy ( spglibtype . international_full , spgtype . international_full , 20 ) ; memcpy ( spglibtype . international_short , spgtype . international_short , 11 ) ; pointgroup = ptg_get_pointgroup ( spgtype . pointgroup_number ) ; memcpy ( spglibtype . pointgroup_international , pointgroup . symbol , 6 ) ; memcpy ( spglibtype . pointgroup_schoenflies , pointgroup . schoenflies , 4 ) ; arth_number = arth_get_symbol ( arth_symbol , spgtype . number ) ; spglibtype . arithmetic_crystal_class_number = arth_number ; memcpy ( spglibtype . arithmetic_crystal_class_symbol , arth_symbol , 7 ) ; spglib_error_code = SPGLIB_SUCCESS ; } else { spglib_error_code = SPGERR_SPACEGROUP_SEARCH_FAILED ; } return spglibtype ; }
Return spglibtype.number = 0 if failed
Return spglibtype . number = 0 if failed