mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_x.cxx
static int attribute(int n, const char *p) {
  // don't put blank things into name:
  if (!*p || *p=='-' || *p=='*') return 0;
  if (n == 3) { // weight
    if (!strncmp(p,"normal",6) ||
	!strncmp(p,"light",5) ||
	!strncmp(p,"medium",6) ||
	!strncmp(p,"book",4)) return 0;
    if (!strncmp(p,"bold",4) || !strncmp(p,"demi",4)) return FL_BOLD;
  } else if (n == 4) { // slant
    if (*p == 'r') return 0;
    if (*p == 'i' || *p == 'o') return FL_ITALIC;
  } else if (n == 5) { // sWidth
    if (!strncmp(p,"normal",6)) return 0;
  }
  return -1;
}
// turn word N of a X font name into either some attribute bits
// (right now 0, FL_BOLD, or FL_ITALIC), or into -1 indicating that
// the word should be put into the name:
turn word N of a X font name into either some attribute bits
(right now 0, FL_BOLD, or FL_ITALIC), or into -1 indicating that
the word should be put into the name.
turn word N of a X font name into either some attribute bits ( right now 0 FL_BOLD or FL_ITALIC ) or into - 1 indicating that the word should be put into the name .
static int attribute(int n, const char *p) {
  if (!*p || *p=='-' || *p=='*') return 0;
  if (n == 3) { 
    if (!strncmp(p,"normal",6) ||
	!strncmp(p,"light",5) ||
	!strncmp(p,"medium",6) ||
	!strncmp(p,"book",4)) return 0;
    if (!strncmp(p,"bold",4) || !strncmp(p,"demi",4)) return FL_BOLD;
  } else if (n == 4) { 
    if (*p == 'r') return 0;
    if (*p == 'i' || *p == 'o') return FL_ITALIC;
  } else if (n == 5) { 
    if (!strncmp(p,"normal",6)) return 0;
  }
  return -1;
}
static int attribute ( int n , const char * p ) { if ( ! * p || * p == ' ' || * p == ' ' ) return 0 ; if ( n == 3 ) { if ( ! strncmp ( p , " " , 6 ) || ! strncmp ( p , " " , 5 ) || ! strncmp ( p , " " , 6 ) || ! strncmp ( p , " " , 4 ) ) return 0 ; if ( ! strncmp ( p , " " , 4 ) || ! strncmp ( p , " " , 4 ) ) return FL_BOLD ; } else if ( n == 4 ) { if ( * p == ' ' ) return 0 ; if ( * p == ' ' || * p == ' ' ) return FL_ITALIC ; } else if ( n == 5 ) { if ( ! strncmp ( p , " " , 6 ) ) return 0 ; } return -1 ; }
turn word N of a X font name into either some attribute bits
(right now 0, FL_BOLD, or FL_ITALIC), or into -1 indicating that
the word should be put into the name:
turn word N of a X font name into either some attribute bits ( right now 0 FL_BOLD or FL_ITALIC ) or into - 1 indicating that the word should be put into the name :
// don't put blank things into name: // weight // slant // sWidth