Skip to content
Snippets Groups Projects
Select Git revision
  • aba7c1206f7e79f81c5d4931b8a10bea1e02a4e5
  • master default protected
  • streebog
  • gost28147
  • master-updates
  • ed448
  • shake256
  • curve448
  • ecc-sqrt
  • gosthash94cp
  • cmac64
  • block16-refactor
  • siv-mode
  • cmac-layout
  • delete-des-compat
  • delete-rsa_blind
  • aes-struct-layout
  • release-3.4-fixes
  • struct-layout
  • attribute-deprecated
  • rename-data-symbols
  • nettle_3.5.1_release_20190627
  • nettle_3.5_release_20190626
  • nettle_3.5rc1
  • nettle_3.4.1_release_20181204
  • nettle_3.4.1rc1
  • nettle_3.4_release_20171119
  • nettle_3.4rc2
  • nettle_3.4rc1
  • nettle_3.3_release_20161001
  • nettle_3.2_release_20160128
  • nettle_3.1.1_release_20150424
  • nettle_3.1_release_20150407
  • nettle_3.1rc3
  • nettle_3.1rc2
  • nettle_3.1rc1
  • nettle_3.0_release_20140607
  • nettle_2.7.1_release_20130528
  • nettle_2.7_release_20130424
  • nettle_2.6_release_20130116
  • nettle_2.5_release_20120707
41 results

bignum.h

Blame
  • Forked from Nettle / nettle
    Source project has a limited visibility.
    master.pike 16.04 KiB
    /* $Id: master.pike,v 1.56 1997/11/11 22:20:59 hubbe Exp $
     *
     * Master-file for Pike.
     */
    
    #define GETCWD_CACHE
    #define FILE_STAT_CACHE
    
    #define UNDEFINED (([])[0])
    #define error(X) throw( ({ (X), backtrace()[0..sizeof(backtrace())-2] }) )
    
    string describe_backtrace(mixed *trace);
    object low_cast_to_object(string oname, string current_file);
    
    string _master_file_name;
    string pike_library_path;
    string *pike_include_path=({});
    string *pike_module_path=({});
    string *pike_program_path=({});
    
    #ifdef GETCWD_CACHE
    string current_path;
    int cd(string s)
    {
      current_path=0;
      return predef::cd(s);
    }
    
    string getcwd()
    {
      return current_path || (current_path=predef::getcwd());
    }
    #endif
    
    string combine_path_with_cwd(string path)
    {
      return combine_path(path[0]=='/'?"/":getcwd(),path);
    }
    
    #ifdef FILE_STAT_CACHE
    
    #define FILE_STAT_CACHE_TIME 20
    
    int invalidate_time;
    mapping(string:multiset(string)) dir_cache = ([]);
    
    mixed *master_file_stat(string x)
    {
      string file, dir=reverse(combine_path_with_cwd(x));
      if(sscanf(dir,"%*[/]%s/%s", file, dir)!=3)
        file=x;
    
      file=reverse(file);
      dir=reverse(dir);
    
      multiset(string) d;
      if(time() > invalidate_time)
      {
        dir_cache=([]);
        invalidate_time=time()+FILE_STAT_CACHE_TIME;
      }
      if(zero_type(d=dir_cache[dir]))
      {
        if(string *tmp=get_dir(dir))
        {
          d=dir_cache[dir]=aggregate_multiset(@tmp);
        }else{
          dir_cache[dir]=0;
        }
      }