+bool
+funcsymbol( nlistp )
+ struct nlist *nlistp;
+{
+ extern char *strtab; /* string table from a.out */
+ extern int aflag; /* if static functions desired */
+ char *name;
+
+ /*
+ * must be a text symbol,
+ * and static text symbols qualify if aflag set.
+ */
+ if ( ! ( ( nlistp -> n_type == ( N_TEXT | N_EXT ) )
+ || ( ( nlistp -> n_type == N_TEXT ) && aflag ) ) ) {
+ return FALSE;
+ }
+ /*
+ * can't have any `funny characters in name,
+ * where `funny' includes `.', .o file names
+ * and `$', pascal labels.
+ */
+ for ( name = strtab + nlistp -> n_un.n_strx ; *name ; name += 1 ) {
+ if ( *name == '.' || *name == '$' ) {
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+