summary refs log tree commit diff stats
path: root/win32/ext/zlib-wdk/install.vcxproj
blob: f19aba8773573fe37ffa549b4a5f937b0af3f799 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <ItemGroup>
    <None Include="install.props">
      <SubType>Designer</SubType>
    </None>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <ProjectGuid>{6064E3A9-3939-4937-A387-C09299FC2952}</ProjectGuid>
    <RootNamespace>install</RootNamespace>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    <Import Project="install.props" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    <Import Project="install.props" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <OutDir>x86\Install$(Configuration)\</OutDir>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <IntDir>x86\Install$(Configuration)\Tmp\</IntDir>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <OutDir>x64\Install$(Configuration)\</OutDir>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <IntDir>x64\Install$(Configuration)\Tmp\</IntDir>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
    </ClCompile>
    <Link>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
    <PreBuildEvent>
      <Command>$(ZlibDoInstall32)</Command>
    </PreBuildEvent>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
    </ClCompile>
    <Link>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
    <PreBuildEvent>
      <Command>$(ZlibDoInstall64)</Command>
    </PreBuildEvent>
  </ItemDefinitionGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>
n> #include <ctype.h> #include <unistd.h> #include "xsys.h" float percentage(unsigned long long *free, unsigned long long *total) { unsigned long long result = (*free) * (unsigned long long)1000 / (*total); return result / 10.0; } char *pretty_freespace(const char *desc, unsigned long long *free_k, unsigned long long *total_k) { char *result, *bytesize; double free_space, total_space; free_space = *free_k; total_space = *total_k; result = malloc(bsize * sizeof(char)); const char *quantities = "KB\0MB\0GB\0TB\0PB\0EB\0ZB\0YB\0"; int i=0; if (total_space == 0) { snprintf(result, bsize, "%s: none", desc); return result; } bytesize = malloc(3 * sizeof(char)); while (total_space > 1023 && i <= 14) { i=i+3; *bytesize=*(quantities+i); *(bytesize+1)=*(quantities+i+1); *(bytesize+2)=*(quantities+i+2); free_space = free_space / 1024; total_space = total_space / 1024; } if (sysinfo_get_percent () != 0) snprintf(result, bsize, "%s: %.1f%s, %.1f%% free", desc, total_space, bytesize, percentage(free_k, total_k)); else snprintf(result, bsize, "%s: %.1f%s/%.1f%s free", desc, free_space, bytesize, total_space, bytesize); free (bytesize); return result; } void remove_leading_whitespace(char *buffer) { char *buffer2 = NULL; int i = 0, j = 0, ews = 0; buffer2 = (char*)malloc(strlen(buffer) * sizeof(char)); if (buffer2 == NULL) return; memset (buffer2, (char)0, strlen(buffer)); while (i < strlen(buffer)) { /* count tabs, spaces as whitespace. */ if (!(buffer[i] == (char)32 || buffer[i] == (char)9) || ews == 1) { ews = 1; buffer2[j] = buffer[i]; j++; } i++; } memset (buffer, (char)0, strlen(buffer)); strcpy (buffer, buffer2); free (buffer2); } char *decruft_filename(char *buffer) { char *match, *match_end; while ((match = strstr(buffer, "%20"))) { match_end = match + 3; *match++ = ' '; while (*match_end) *match++ = *match_end++; *match = 0; } return buffer; } void find_match_char(char *buffer, char *match, char *result) { char *position; remove_leading_whitespace(buffer); if(strstr(buffer, match) == strstr(buffer, buffer)) { position = strpbrk(buffer, delims); if (position != NULL) { position += 1; strcpy(result, position); position = strstr(result, "\n"); *(position) = '\0'; remove_leading_whitespace(result); } else strcpy(result, "\0"); } } void find_match_double(char *buffer, char *match, double *result) { char *position; remove_leading_whitespace(buffer); if(strstr(buffer, match) == strstr(buffer, buffer)) { position = strpbrk(buffer, delims); if (position != NULL) { position += 1; *result = strtod(position, NULL); } else *result = 0; } } void find_match_double_hex(char *buffer, char *match, double *result) { char *position; remove_leading_whitespace(buffer); if(strstr(buffer, match) == strstr(buffer, buffer)) { position = strpbrk(buffer, delims); if (position != NULL) { memcpy(position,"0x",2); *result = strtod(position,NULL); } else *result = 0; } } void find_match_int(char *buffer, char *match, unsigned int *result) { char *position; remove_leading_whitespace(buffer); if(strstr(buffer, match) == strstr(buffer, buffer)) { position = strpbrk(buffer, delims); if (position != NULL) { position += 1; *result = atoi(position); } else *result = 0; } } void find_match_ll(char *buffer, char *match, unsigned long long *result) { char *position; remove_leading_whitespace(buffer); if(strstr(buffer, match) == strstr(buffer, buffer)) { position = strpbrk(buffer, delims); if (position != NULL) { position += 1; *result = strtoll(position, NULL, 10); } else *result = 0; } } void format_output(const char *arg, char *string, char *format) { char *pos1, *pos2, buffer[bsize]; pos1 = &format[0]; strncpy(buffer, string, bsize); string[0] = '\0'; while((pos2 = strstr(pos1, "%")) != NULL) { strncat(string, pos1, (size_t)(pos2-pos1)); if(*(pos2+1) == '1') strcat(string, arg); else if(*(pos2+1) == '2') strcat(string, buffer); else if(*(pos2+1) == 'C' || *(pos2+1) == 'c') strcat(string, "\003"); else if(*(pos2+1) == 'B' || *(pos2+1) == 'b') strcat(string, "\002"); else if(*(pos2+1) == 'R' || *(pos2+1) == 'r') strcat(string, "\026"); else if(*(pos2+1) == 'O' || *(pos2+1) == 'o') strcat(string, "\017"); else if(*(pos2+1) == 'U' || *(pos2+1) == 'u') strcat(string, "\037"); else if(*(pos2+1) == '%') strcat(string, "%"); pos1=pos2+2; } strcat(string, pos1); } void flat_format_output(const char *arg, char *string, char *format) { char *pos1, *pos2, buffer[bsize]; pos1 = &format[0]; strncpy(buffer, string, bsize); string[0] = '\0'; while((pos2 = strstr(pos1, "%")) != NULL) { strncat(string, pos1, (size_t)(pos2-pos1)); if(*(pos2+1) == '1') strcat(string, arg); else if(*(pos2+1) == '2') strcat(string, buffer); else if(*(pos2+1) == '%') strcat(string, "%"); pos1=pos2+2; } strcat(string, pos1); }