⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 recmj.c

📁 免费的Sql数据库系统
💻 C
字号:
/* *  recmj.c  - Records in Microjournal *             Kernel of GNU SQL-server  * *  This file is a part of GNU SQL Server * *  Copyright (c) 1996, 1997, Free Software Foundation, Inc *  Developed at the Institute of System Programming *  This file is written by  Vera Ponomarenko * *  This program is free software; you can redistribute it and/or modify *  it under the terms of the GNU General Public License as published by *  the Free Software Foundation; either version 2 of the License, or *  (at your option) any later version. * *  This program is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *  GNU General Public License for more details. * *  You should have received a copy of the GNU General Public License *  along with this program; if not, write to the Free Software *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * *  Contacts:   gss@ispras.ru * *//* $Id: recmj.c,v 1.246 1997/04/15 11:45:41 vera Exp $ */#include "destrn.h"#include "strml.h"#include "fdcltrn.h"#include "xmem.h"#define SZMJBF SZMSGBUF-2*size2bstruct rec_mj{  struct ADBL addmj;  char typemj;  i4_t idmmj;  u2_t snmj;  u2_t pnmj;  u2_t offmj;  u2_t fsmj;};extern struct ADBL admj;extern struct ADREC blmj;extern char *bufmj;extern char *pbufmj;voidrecmjform (i4_t type, u2_t sn, u2_t pn, i4_t idm, u2_t off, u2_t fs, char *af, i2_t shsize){  u2_t size;  char *a;  size = adjsize + 1 + size4b + 4 * size2b;  if (type != OLD)    size += size2b;  else    size += fs;  if (type == COMBR || type == COMBL)    size += shsize;  size += pbufmj - bufmj;  if (size > SZMJBF)    MJ_PUTBL ();  a = pbufmj;  bcopy ((char *) &admj, a, adjsize);  a += adjsize;  *a++ = type;  t4bpack (idm, a);  a += size4b;  t2bpack (sn, a);  a += size2b;  t2bpack (pn, a);  a += size2b;  t2bpack (off, a);  a += size2b;  t2bpack (fs, a);  a += size2b;  if (type != OLD)    {      bcopy ((char *) &shsize, a, size2b);      a += size2b;    }  else    {      bcopy (af, a, fs);      a += fs;    }  if (type == COMBR || type == COMBL)    {      bcopy (af, a, shsize);      a += shsize;    }  pbufmj = a;}i4_tbegmop (char *asp){  i4_t idm;  beg_mop ();  idm = ++((struct p_head *) asp)->idmod;  return (idm);}voidbeg_mop (){  admj.npage = 1;  admj.cm = 0;  pbufmj = bufmj;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -