monotone

monotone Mtn Source Tree

Root/platform.hh

1#ifndef __PLATFORM_HH__
2#define __PLATFORM_HH__
3
4// copyright (C) 2002, 2003, 2004 graydon hoare <graydon@pobox.com>
5// all rights reserved.
6// licensed to the public under the terms of the GNU GPL (>= 2)
7// see the file COPYING for details
8
9// this describes functions to be found, alternatively, in win32/* or unix/*
10// directories.
11
12#include <string>
13
14#include "vocab.hh"
15
16void read_password(std::string const & prompt, char * buf, size_t bufsz);
17void get_system_flavour(std::string & ident);
18bool is_executable(const char *path);
19
20// For LUA
21int existsonpath(const char *exe);
22int make_executable(const char *path);
23int process_spawn(const char * const argv[]);
24int process_wait(int pid, int *res);
25int process_kill(int pid, int signal);
26int process_sleep(unsigned int seconds);
27
28// for term selection
29bool have_smart_terminal();
30// this function cannot call W/P/L, because it is called by the tick printing
31// code.
32// return value of 0 means "unlimited"
33unsigned int terminal_width();
34
35// for netsync
36void start_platform_netsync();
37void end_platform_netsync();
38
39// for "reckless mode" working copy change detection.
40// returns 'true' if it has generated a valid inodeprint; returns 'false' if
41// there was a problem, in which case we should act as if the inodeprint has
42// changed.
43bool inodeprint_file(file_path const & file, hexenc<inodeprint> & ip);
44
45#endif // __PLATFORM_HH__

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status