Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/epiqc/ScaffCC
10 October 2025, 02:50:01 UTC
  • Code
  • Branches (10)
  • Releases (1)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/ScaffCC_OSX
    • refs/heads/master
    • refs/tags/2.2
    • refs/tags/5.0
    • refs/tags/v1.0
    • refs/tags/v1.0-beta.2
    • refs/tags/v2.0
    • refs/tags/v2.1
    • refs/tags/v3.0
    • refs/tags/v4.0
    • v3.1
  • 5990d7a
  • /
  • scaffold
  • /
  • scaffold.cpp
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:d1835ebd008c8fbfdfa99080d60781635cc5a0c1
origin badgedirectory badge Iframe embedding
swh:1:dir:983517a0bf5071548d53b25b2c8b7591eb6f3d79
origin badgerevision badge
swh:1:rev:be5bfe685a7b7268af2ae0344c2ffe444e77f296
origin badgesnapshot badge
swh:1:snp:7eb50f12cf990a0030724453139e994df238639f

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: be5bfe685a7b7268af2ae0344c2ffe444e77f296 authored by ah744 on 20 August 2016, 18:31:59 UTC
Small script changes
Tip revision: be5bfe6
scaffold.cpp
#include <iostream>

#include "llvm/Support/Host.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"

#include "clang/Frontend/DiagnosticOptions.h"
#include "clang/Frontend/TextDiagnosticPrinter.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Basic/TargetOptions.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/FileManager.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/Parse/ParseAST.h"

#include "clang/Lex/Preprocessor.h"
#include "clang/AST/ASTContext.h"

int main(int argc, char *argv[]) {
	using clang::CompilerInstance;
	using clang::TargetOptions;
	using clang::TargetInfo;
	using clang::FileEntry;
	using clang::ASTConsumer;
	using clang::DiagnosticOptions;
	using clang::TextDiagnosticPrinter;

	CompilerInstance CI;
	DiagnosticOptions diagnosticOptions;
	TextDiagnosticPrinter *pTextDiagnosticPrinter =
		new TextDiagnosticPrinter(
			llvm::outs(), diagnosticOptions, true);
	CI.createDiagnostics(0, NULL, pTextDiagnosticPrinter);

	TargetOptions targetOptions;
	targetOptions.Triple = llvm::sys::getDefaultTargetTriple();
	TargetInfo *pTargetInfo = TargetInfo::CreateTargetInfo(
			CI.getDiagnostics(), targetOptions);
	CI.setTarget(pTargetInfo);

	CI.createFileManager();
	CI.createSourceManager(CI.getFileManager());
	CI.createPreprocessor();
	CI.getPreprocessorOpts().UsePredefines = false;
	ASTConsumer *astConsumer = new ASTConsumer();
	CI.setASTConsumer(astConsumer);

	CI.createASTContext();
	CI.createSema(clang::TU_Complete, NULL);

	const FileEntry *pFile = CI.getFileManager().getFile(argv[1]);
	CI.getSourceManager().createMainFileID(pFile);

	CI.getASTContext().BuiltinInfo.InitializeBuiltins(
		CI.getPreprocessor().getIdentifierTable(), CI.getLangOpts());

	CI.getDiagnosticClient().BeginSourceFile(
			CI.getLangOpts(), &(CI.getPreprocessor()));
	clang::ParseAST(CI.getSema());
	CI.getDiagnosticClient().EndSourceFile();

	return 0;
	}

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API