9 date 92.12.15.00.20.22; author jromine; state Exp;
14 date 92.02.11.21.32.04; author jromine; state Exp;
19 date 92.02.03.16.35.19; author jromine; state Exp;
24 date 92.01.31.21.55.24; author jromine; state Exp;
29 date 90.04.05.15.32.29; author sources; state Exp;
34 date 90.04.05.14.50.04; author sources; state Exp;
39 date 90.03.20.15.58.30; author sources; state Exp;
44 date 90.03.20.15.58.13; author sources; state Exp;
58 @/* m_remsg.c - realloc a msgs structure */
60 static char ident[] = "@@(#)$Id: m_remsg.c,v 1.7 1992/02/11 21:32:04 jromine Exp jromine $";
67 struct msgs *m_remsg (mp, lo, hi)
68 register struct msgs *mp;
78 if (lo == 0 && (lo = mp -> lowmsg) == 0)
80 if (hi < mp -> hghmsg)
81 hi = mp -> hghmsg + (MAXFOLDER - mp -> nummsg);
82 if (hi <= mp -> hghmsg)
83 hi = mp -> hghmsg + MAXFOLDER;
84 if (lo == mp -> lowmsg && hi == mp -> hghmsg)
88 mp = (struct msgs *) realloc ((char *) mp, MHSIZE (mp, lo, hi));
90 adios (NULLCP, "unable to re-allocate folder storage");
92 if ((sp = (int *) calloc ((unsigned) 1, MHSIZEX (mp, lo, hi))) == NULL)
93 adios (NULLCP, "unable to re-allocate messages storage");
97 adios (NULLCP, "m_remsg() botch -- you lose big[1]");
98 for (msgnum = mp -> lowmsg; msgnum <= mp -> hghmsg; msgnum++)
99 pp[msgnum] = mp -> msgstats[msgnum];
100 free ((char *) mp -> msgbase);
106 mp -> msgstats = (mp -> msgbase = mp -> msgstats) - mp -> lowoff;
107 if (mp -> msgstats < (int *)0)
108 adios (NULLCP, "m_remsg() botch -- you lose big[2]");
110 for (msgnum = mp -> lowmsg - 1; msgnum >= lo; msgnum--)
111 mp -> msgstats[msgnum] = 0;
112 for (msgnum = mp -> hghmsg + 1; msgnum <= hi; msgnum++)
113 mp -> msgstats[msgnum] = 0;
122 @put sequences in an "int"
127 static char ident[] = "@@(#)$Id: m_remsg.c,v 1.6 1992/02/03 16:35:19 jromine Exp jromine $";
151 static char ident[] = "@@(#)$Id: m_remsg.c,v 1.5 1992/01/31 21:55:24 jromine Exp jromine $";
157 if ((sp = (short *) calloc ((unsigned) 1, MHSIZEX (mp, lo, hi))) == NULL)
163 if (mp -> msgstats < (short *)0)
174 static char ident[] = "@@(#)$Id: m_remsg.c,v 1.4 1990/04/05 15:32:29 sources Exp jromine $";
177 mp = (struct msgs *) realloc ((char *) mp, MSIZE (mp, lo, hi));
180 if ((sp = (short *) calloc ((unsigned) 1, MSIZEX (mp, lo, hi))) == NULL)
191 static char ident[] = "@@(#)$Id:$";
194 mp -> msgstats[msgnum] = NULL;
197 mp -> msgstats[msgnum] = NULL;
208 static char ident[] = "$Id:";
231 if (mp -> msgstats < 0)