- /* Compile format string */
- ncomps = fmt_compile(nfs, &fmt) + 1;
-
- FINDCOMP(datecomp, "date");
- FINDCOMP(cptr, "folder");
- if (cptr && folder)
- cptr->c_text = folder;
- FINDCOMP(cptr, "encrypted");
- if (!cptr)
- if ((cptr = (struct comp *)calloc(1, sizeof(*cptr)))) {
- cptr->c_name = "encrypted";
- cptr->c_next = wantcomp[i=CHASH(cptr->c_name)];
- wantcomp[i] = cptr;
- ncomps++;
+ if (fmtstr) {
+ if (width == 0) {
+ if ((width = sc_width()) < WIDTH/2)
+ width = WIDTH/2;
+ else if (width > MAXSCANL)
+ width = MAXSCANL;
+ }
+ dat[3] = slwidth = width;
+ scanl = (char *) mh_xmalloc((size_t) SCAN_CHARWIDTH *
+ (slwidth + 2)); /* probably for \n and \0 */
+ /* Compile format string */
+ ncomps = fmt_compile(fmtstr, &fmt) + 1;
+ FINDCOMP(datecomp, "date");
+ } else {
+ ncomps = 1;
+ datecomp = NULL;