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

Raw File Download

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
content badge Iframe embedding
swh:1:cnt:d6b3bae6d9a285849e6d221a2fef027e4e9df4fb

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
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
/* Singly Linked List of Blocks */
// This data structure should be used only for the GCoptimization class implementation
// because it lucks some important general functions for general list, like remove_item()
// The head block may be not full 
// For regular 2D grids, it's better to set GCLL_BLOCK_SIZE to 2
// For other graphs, it should be set to the average expected number of neighbors
// Data in linked list for the neighborhood system is allocated in blocks of size GCLL_BLOCK_SIZE 

#ifndef __LINKEDBLOCKLIST_H__
#define __LINKEDBLOCKLIST_H__

#define GCLL_BLOCK_SIZE 4  
// GCLL_BLOCKSIZE should "fit" into the type BlockType. That is 
// if GCLL_BLOCKSIZE is larger than 255 but smaller than largest short integer
// then  BlockType should be set to short
typedef char BlockType;

//The type of data stored in the linked list
typedef void * ListType;

class LinkedBlockList{

public: 
	void addFront(ListType item);
	inline bool isEmpty(){if (m_head == 0) return(true); else return(false);};
	inline LinkedBlockList(){m_head = 0; m_head_block_size = GCLL_BLOCK_SIZE;}; 
	~LinkedBlockList();

	// Next three functins are for the linked list traversal
	inline void setCursorFront(){m_cursor = m_head; m_cursor_ind = 0;};
	ListType next();
	bool hasNext();

private:
	typedef struct LLBlockStruct{
		ListType m_item[GCLL_BLOCK_SIZE];
		struct LLBlockStruct *m_next;
	} LLBlock;

	LLBlock *m_head;
	// Remembers the number of elements in the head block, since it may not be full
	BlockType m_head_block_size;
	// For block traversal, points to current element in the current block
	BlockType m_cursor_ind;
	// For block traversal, points to current block in the linked list
	LLBlock *m_cursor;
};

#endif

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