Ejemplo n.º 1
0
/* Find and store all of the directories, and index them in the dpointers array */
long get_directories(void)
{
	char temp[80];
	long count,c,rcnt=0;

	count = getfnl("*", dirs, sizeof(dirs), FA_SUBDIR );
	if (count > 0) {
		if (strbpl(dpointers,300,dirs)!=count) {
			fprintf(stderr, "Too many mailbox directories\n");
			deinitialize();
			exit(1);
		}
		strsrt( dpointers, count );
		for (c=0;c<count;c++) {
			if (dpointers[c][0]=='.') { continue; }
			rcnt++;
		/*	sprintf( temp, "[0][Checking Directory |%s][OK]", dpointers[c] ); */
		/*	form_alert( 1, temp ); */
		}
		sprintf( temp, "[0][You have %ld Mail Directories][OK]", rcnt );
		form_alert( 1, temp );
	} else {
		if (_OSERR) poserr( "DIRS");
		else fprintf(stderr, "Too many mailbox directories\n");
		deinitialize();
		exit(1);
	}
	return(count);
}
Ejemplo n.º 2
0
/**
 * Fire off the topic specified by the given parameter.
 *
 * @param plot
 */
void Topics::plot(const std::string& plot) {
  std::vector<std::string> plots = getPlots();

  if (plot == plots[0]) {
    acc();
  } else if (plot == plots[1]) {
    posvel();
  } else if (plot == plots[2]) {
    posvelmov();
  } else if (plot == plots[3]) {
    poserr();
  }
}
Ejemplo n.º 3
0
/* Find and store all of the mailboxes, and index them in the pointers array */
long get_mailboxes(void)
{
	char temp[80];
	long count;

	count = getfnl("*.MBX", boxes, sizeof(boxes), 0 );
	if (count > 0) {
		if (strbpl(pointers,200,boxes)!=count) {
			fprintf(stderr, "Too many mailbox files\n");
			deinitialize();
			exit(1);
		}
		sprintf( temp, "[0][You have %ld Mailboxes][OK]", count );
		form_alert( 1, temp );
		strsrt( pointers, count );
	} else {
		if (_OSERR) poserr( "FILES");
		else fprintf(stderr, "Too many mailbox files\n");
		deinitialize();
		exit(1);
	}
	return(count);
}