/*- * Copyright (c) 1992 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * Rodney Ruddock of the University of Guelph. * * %sccs.include.redist.c% */ #ifndef lint static char sccsid[] = "@(#)add_line.c 5.2 (Berkeley) 01/23/93"; #endif /* not lint */ #include #include #include #include #include #include "ed.h" #include "extern.h" /* * This is where the lines actually are put into the buffer. */ recno_t add_line(p, len) char *p; long len; { DBT db_key, db_data; static recno_t l_key; l_key++; (db_key.data) = &l_key; (db_key.size) = sizeof(recno_t); (db_data.data) = p; (db_data.size) = len; (dbhtmp->put)(dbhtmp, &db_key, &db_data, (u_int)(R_NOOVERWRITE)); return(l_key); }