Remove unused functions which we won't in the future

dbf_head_info() and out_rec() print directly to stdout and are as such
not really useful for us. They might be helpful for debugging purposes,
but even that is doubtful, so we remove both functions.

git-svn-id: http://svn.php.net/repository/pecl/dbase/trunk@340835 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christoph Michael Becker
2016-11-01 17:24:46 +00:00
parent b0676dd29f
commit e6f47b33e4
4 changed files with 0 additions and 35 deletions

View File

@@ -307,21 +307,6 @@ dbhead_t *dbf_open(char *dp, int o_flags)
dbh->db_cur_rec = 0;
return dbh;
}
void dbf_head_info(dbhead_t *dbh)
{
int nfields;
dbfield_t *dbf, *cur_f;
nfields = dbh->db_nfields;
printf("# fields: %d, record len: %d, total records %ld\n",
nfields, dbh->db_rlen, dbh->db_records);
dbf = dbh->db_fields;
for (cur_f = dbf; cur_f < &dbf[nfields] ; cur_f++) {
printf("# %s, %c, %d, %d\n", cur_f->db_fname,
cur_f->db_type, cur_f->db_flen, cur_f->db_fdc);
}
}
/*
* Local variables:

View File

@@ -8,4 +8,3 @@ extern int put_dbf_field(dbhead_t *dbh, dbfield_t *dbf);
int put_dbf_info(dbhead_t *dbh);
extern char *get_dbf_f_fmt(dbfield_t *dbf);
extern dbhead_t *dbf_open(char *dp, int o_flags);
void dbf_head_info(dbhead_t *dbh);

View File

@@ -185,24 +185,6 @@ void put_field_val(char *rp, dbfield_t *fldp, char *cp)
strncpy(&rp[fldp->db_foffset], cp, fldp->db_flen);
}
/*
* output a record
*/
void out_rec(dbhead_t *dbh, dbfield_t *dbf, char *cp)
{
dbfield_t *cur_f;
int nfields = dbh->db_nfields;
char *fnp = (char *)emalloc(dbh->db_rlen);
printf("%c", *cp);
for (cur_f = dbf; cur_f < &dbf[nfields] ; cur_f++) {
printf(" ");
printf(cur_f->db_format, get_field_val(cp, cur_f, fnp));
}
printf("\n");
efree(fnp);
}
/* check for record validity */
int is_valid_rec(char *cp)
{

View File

@@ -7,6 +7,5 @@ int pack_dbf(dbhead_t *dbh);
extern char *get_field_val(char *rp, dbfield_t *fldp, char *cp);
char *get_binary_field_val(char *rp, dbfield_t *fldp, char *cp);
void put_field_val(char *rp, dbfield_t *fldp, char *cp);
void out_rec(dbhead_t *dbh, dbfield_t *dbf, char *cp);
extern int is_valid_rec(char *cp);
extern char *dbf_get_next(dbhead_t *dbh);