예제 #1
0
파일: cycle.c 프로젝트: cyisfor/ponyc
static bool mark_grey(detector_t* d, view_t* view, size_t rc)
{
  if(!view->blocked || (view->actor == NULL))
    return false;

  // apply any stored reference delta
  apply_delta(d, view);

  if(view->deferred)
  {
    ponyint_viewmap_remove(&d->deferred, view);
    view->deferred = false;
  }

  // if rc > view->rc, this will show as a huge number, which is fine
  // it just means our view is out of date for this actor
  view->rc -= rc;

  if(view->color == COLOR_GREY)
    return false;

  assert(view->color == COLOR_BLACK);
  view->color = COLOR_GREY;
  return true;
}
예제 #2
0
파일: test-svn-fe.c 프로젝트: 1tgr/git
int cmd_main(int argc, const char **argv)
{
	if (argc == 2) {
		if (svndump_init(argv[1]))
			return 1;
		svndump_read(NULL, "refs/heads/master", "refs/notes/svn/revs");
		svndump_deinit();
		svndump_reset();
		return 0;
	}

	if (argc >= 2 && !strcmp(argv[1], "-d"))
		return apply_delta(argc, argv);
	usage(test_svnfe_usage);
}
예제 #3
0
void fast_export_blob_delta(uint32_t mode,
				uint32_t old_mode, const char *old_data,
				off_t len, struct line_buffer *input)
{
	long postimage_len;

	assert(len >= 0);
	postimage_len = apply_delta(len, input, old_data, old_mode);
	if (mode == REPO_MODE_LNK) {
		buffer_skip_bytes(&postimage, strlen("link "));
		postimage_len -= strlen("link ");
	}
	printf("data %ld\n", postimage_len);
	buffer_copy_bytes(&postimage, postimage_len);
	fputc('\n', stdout);
}