+ /*
+ * Allow local .exrc too. This loses if . is $HOME,
+ * but nobody should notice unless they do stupid things
+ * like putting a version command in .exrc. Besides,
+ * they should be using EXINIT, not .exrc, right?
+ */
+ if (iownit(".exrc"))
+ source(".exrc", 1);
+ }
+#ifdef UNIX_SBRK
+ /*
+ * Initialize end of core pointers.
+ * Normally we avoid breaking back to fendcore after each
+ * file since this can be expensive (much core-core copying).
+ * If your system can scatter load processes you could do
+ * this as ed does, saving a little core, but it will probably
+ * not often make much difference.
+ */
+ fendcore = (line *) sbrk(0);
+ endcore = fendcore - 2;
+#else
+ /*
+ * Allocate all the memory we will ever use in one chunk.
+ * This is for system such as VMS where sbrk() does not
+ * guarantee that the memory allocated beyond the end is
+ * consecutive. VMS's RMS does all sorts of memory allocation
+ * and screwed up ex royally because ex assumes that all
+ * memory up to "endcore" belongs to it and RMS has different
+ * ideas.
+ */
+ fendcore = (line *) malloc((unsigned)
+ value(LINELIMIT) * sizeof (line *));
+ if (fendcore == NULL) {
+ lprintf("ex: cannot handle %d lines\n", value(LINELIMIT));
+ lprintf("ex: set \"linelimit\" lower\n");
+ flush();
+ ex_exit(1);
+ }
+ endcore = fendcore + (value(LINELIMIT) - 1);
+#endif
+ init(); /* moved after prev 2 chunks to fix directory option */