rem: fprintf(stdout, "Deleting %s\n",file);
add: fprintf(stdout, "Status: Deleting: %s\n",file);
context: db_remove_file_def(int softdel,char *file){	DB      *dbp = db_syms[PAF_FILE_SYMBOLS];	DB      *db_del = NULL;	DBT     data;	DBT     key;	DBT     sc_key;	DBT     sc_data;	int     flag;	unsigned int    cmp_len;	char    filename[MAXPATHLEN + 1];	LongString	delkey;	LongString	pars;	int     scope_val = -1;	int     del;	int     del_fil;	fprintf(stdout, "Deleting %s\n",file);	/* Informs SN which files is being deleted. */	fflush(stdout);	if (!dbp)	{		dbp = create_table(PAF_FILE_SYMBOLS,O_RDWR,db_cachesize);		if (!dbp)			return;		if (!db_syms[PAF_COMMENT_DEF])			create_table(PAF_COMMENT_DEF,O_RDWR,db_cachesize);	}	db_remove_comment_def(softdel,file);	if (!db_scopes)	{		char	**scopep;		db_scopes = dbopen (NULL, O_RDWR|O_CREAT, get_db_permission(), DB_HASH, NULL);		data.data = (char *)&scope_val;		data.size = sizeof(scope_val);		for (scope_val = PAF_FILE, scopep = SN_symbol_types; *scopep;			scopep++,scope_val++)		{			key.data = *scopep;			key.size = strlen(key.data);			if (key.size > 0)			{				if (db_scopes->put(db_scopes,&key,&data,R_NOOVERWRITE) == -1)				{					fprintf(stderr,"Write error: %s\n",strerror(errno));				}			}		}	}	LongStringInit(&delkey,0);	LongStringInit(&pars,0);	/*	 * Add separator at the end of file to unique identify it's records	 */	sprintf(filename,"%s%c", file, DB_FLDSEP_CHR);	cmp_len = strlen(filename);	key.data = filename;	key.size = cmp_len;	data.data = NULL;	data.size = 0;	for (flag = R_CURSOR; dbp->seq(dbp,&key,&data,flag) == 0; flag = R_NEXT)	{		if ((int)key.size < cmp_len || memcmp(key.data,filename,cmp_len) != 0)		{			break;		}				/*		 * get scope name (at the end of the key field list)		 */		sc_key.data = strrchr(key.data, DB_FLDSEP_CHR) + 1;		sc_key.size = strlen(sc_key.data);		/*		 * verify if this scope exists		 */		if (db_scopes->get(db_scopes,&sc_key,&sc_data,0) != 0)		{			fprintf(stderr,"unknown scope: \"%s\" in \"%s\"\n",				(char *)sc_key.data,(char *)key.data);			continue;		}		pars.split(&pars, key.data, key.size - 1, 0, DB_FLDSEP_CHR, -1);		memcpy((char *)&scope_val,sc_data.data,sc_data.size);		switch (scope_val)		{		case PAF_EXCEPTION_DEF:		case PAF_MBR_FUNC_DEF:		case PAF_MBR_FUNC_DCL:		case PAF_FRIEND_DCL:		case PAF_MBR_VAR_DEF:		case PAF_COMMON_MBR_VAR_DEF:		case PAF_CLASS_INHERIT:		case PAF_LOCAL_VAR_DEF:			/* Key format: class member lineno filename */			delkey.copy(&delkey,				pars.field_value[2],				pars.field_size[2]);			delkey.append (&delkey, DB_FLDSEP_STR, -1); /* Separator */			delkey.append(&delkey,				pars.field_value[3],				pars.field_size[3]);			delkey.append(&delkey, DB_FLDSEP_STR, -1); /* Separator */			delkey.append(&delkey,				pars.field_value[1],				pars.field_size[1]);			delkey.append(&delkey, DB_FLDSEP_STR, -1); /* Separator */			delkey.append(&delkey,				file,				cmp_len -1);			break;		default:			/* Key format: symbol lineno filename */			delkey.copy(&delkey,				pars.field_value[3],				pars.field_size[3]);			delkey.append(&delkey, DB_FLDSEP_STR, -1); /* Separator */			delkey.append(&delkey,				pars.field_value[1],				pars.field_size[1]);			delkey.append(&delkey, DB_FLDSEP_STR, -1); /* Separator */			delkey.append(&delkey,				file,				cmp_len -1);			break;		}		sc_key.data = (void *)delkey.buf;		sc_key.size = delkey.len + 1;		if (!(db_del = db_syms[scope_val]))		{			db_del = create_table(scope_val,O_RDWR,db_cachesize);			if (!db_del)			{				continue;			}		}		del_fil = dbp->del(dbp,&key,DEL_SEQ_VALUE);		del = db_del->del(db_del,&sc_key,0);		/* Send message if something went wrong except we could		 * not delete a local variable from its table. */		if (del_fil != 0 || (del != 0 && scope_val != PAF_LOCAL_VAR_DEF))		{			fprintf(stderr,"DELETING of <%s> with size: %d type <%s> returned: %d,%d\n",				(char *)sc_key.data,				sc_key.size,				SN_symbol_types[scope_val],				del_fil,				del);		}	}	delkey.free(&delkey);	pars.free(&pars);}