Final 0.6.11 version; only trivial changes
diff --git a/NEWS b/NEWS
index 7071eeb..a2afa17 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,10 @@
-0.6.11 (??/??/2010):
---------------------
+0.6.11 (9/25/2010):
+-------------------
+
+- Added -F (--first-aligned-in-largest) option to sgdisk. This option is a
+  variant on -f (--first-in-largest); it returns the number of the first
+  sector that will be used in the largest free area, given the current
+  alignment value (set via -a/--set-alignment).
 
 - Streamlined GUID code entry in gdisk; it no longer offers the option
   to enter GUIDs in separate segments.
diff --git a/attributes.cc b/attributes.cc
index c9c1d23..f068e6d 100644
--- a/attributes.cc
+++ b/attributes.cc
@@ -180,8 +180,8 @@
 
       // display a single attribute
       case ao_get: {
-         cout << partNum+1 << ":" << bitNum << ":" <<
-              bool (attributeBitMask & attributes) << endl;
+         cout << partNum+1 << ":" << bitNum << ":"
+              << bool (attributeBitMask & attributes) << endl;
          break;
       } // case ao_get
 
diff --git a/current.spec b/current.spec
index 009de63..6aed76f 100644
--- a/current.spec
+++ b/current.spec
@@ -1,11 +1,11 @@
 Summary: An fdisk-like partitioning tool for GPT disks
 Name: gdisk
-Version: 0.6.10
+Version: 0.6.11
 Release: 1%{?dist}
 License: GPLv2
 URL: http://www.rodsbooks.com/gdisk
 Group: Applications/System
-Source: http://www.rodsbooks.com/gdisk/gdisk-0.6.10.tgz
+Source: http://www.rodsbooks.com/gdisk/gdisk-0.6.11.tgz
 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
 %description
@@ -40,5 +40,5 @@
 %doc %{_mandir}/man8*
 
 %changelog
-* Sun Aug 22 2010 R Smith <rodsmith@rodsbooks.com> - 0.6.10
-- Created spec file for 0.6.10 release
+* Sat Sep 25 2010 R Smith <rodsmith@rodsbooks.com> - 0.6.11
+- Created spec file for 0.6.11 release
diff --git a/gdisk.8 b/gdisk.8
index 4e2a031..cab2654 100644
--- a/gdisk.8
+++ b/gdisk.8
@@ -1,6 +1,6 @@
 .\" Copyright 2010 Roderick W. Smith (rodsmith@rodsbooks.com)
 .\" May be distributed under the GNU General Public License
-.TH "GDISK" "8" "0.6.10" "Roderick W. Smith" "GPT fdisk Manual"
+.TH "GDISK" "8" "0.6.11" "Roderick W. Smith" "GPT fdisk Manual"
 .SH "NAME"
 gdisk \- Interactive GUID partition table (GPT) manipulator
 .SH "SYNOPSIS"
diff --git a/gdisk.cc b/gdisk.cc
index 2da3623..f47ec5e 100644
--- a/gdisk.cc
+++ b/gdisk.cc
@@ -44,7 +44,7 @@
          device = new char[255];
          junk = fgets(device, 255, stdin);
          if (device[0] != '\n') {
-            i = strlen(device);
+            i = (int) strlen(device);
             if (i > 0)
                if (device[i - 1] == '\n')
                   device[i - 1] = '\0';
@@ -412,7 +412,7 @@
             device = new char[255];
             junk = fgets(device, 255, stdin);
             if (device[0] != '\n') {
-               i = strlen(device);
+               i = (int) strlen(device);
                if (i > 0)
                   if (device[i - 1] == '\n')
                      device[i - 1] = '\0';
diff --git a/gpt.cc b/gpt.cc
index 78b1557..be3373d 100644
--- a/gpt.cc
+++ b/gpt.cc
@@ -2191,7 +2191,7 @@
 // Returns the computed alignment value.
 uint32_t GPTData::ComputeAlignment(void) {
    uint32_t i = 0, found, exponent = 31;
-   uint64_t align = DEFAULT_ALIGNMENT;
+   uint32_t align = DEFAULT_ALIGNMENT;
 
    exponent = (uint32_t) log2(DEFAULT_ALIGNMENT);
    for (i = 0; i < numParts; i++) {
diff --git a/gpt.h b/gpt.h
index 115ce4f..d23801f 100644
--- a/gpt.h
+++ b/gpt.h
@@ -16,7 +16,7 @@
 #ifndef __GPTSTRUCTS
 #define __GPTSTRUCTS
 
-#define GPTFDISK_VERSION "0.6.11-pre3"
+#define GPTFDISK_VERSION "0.6.11"
 
 // Constants used by GPTData::PartsToMBR(). MBR_EMPTY must be the lowest-
 // numbered value to refer to partition numbers. (Most will be 0 or positive,
diff --git a/gptpart.cc b/gptpart.cc
index cea8362..7be3740 100644
--- a/gptpart.cc
+++ b/gptpart.cc
@@ -106,7 +106,7 @@
       junk = fgets(newName, NAME_SIZE / 2, stdin);
 
       // Input is likely to include a newline, so remove it....
-      i = strlen(newName);
+      i = (int) strlen(newName);
       if ((i > 0) && (i <= NAME_SIZE))
          if (newName[i - 1] == '\n')
             newName[i - 1] = '\0';
diff --git a/guid.cc b/guid.cc
index 11e02d4..63aca2f 100644
--- a/guid.cc
+++ b/guid.cc
@@ -24,7 +24,7 @@
 using namespace std;
 
 GUIDData::GUIDData(void) {
-   srand(time(0));
+   srand((unsigned int) time(0));
    Zero();
 } // constructor
 
diff --git a/sgdisk.8 b/sgdisk.8
index dfdd9a7..e44079b 100644
--- a/sgdisk.8
+++ b/sgdisk.8
@@ -1,6 +1,6 @@
 .\" Copyright 2010 Roderick W. Smith (rodsmith@rodsbooks.com)
 .\" May be distributed under the GNU General Public License
-.TH "SGDISK" "8" "0.6.10" "Roderick W. Smith" "GPT fdisk Manual"
+.TH "SGDISK" "8" "0.6.11" "Roderick W. Smith" "GPT fdisk Manual"
 .SH "NAME"
 sgdisk \- Command\-line GUID partition table (GPT) manipulator for Linux and Unix
 .SH "SYNOPSIS"
@@ -235,7 +235,17 @@
 Displays the sector number of the start of the largest available block of
 sectors on the disk. A script may store this value and pass it back as
 part of \fI\-n\fR's option to create a partition. If no unallocated
-sectors are available, this function returns the value 0.
+sectors are available, this function returns the value 0. Note that this
+parameter is blind to partition alignment; when you actually create a
+partition, its start point might be changed from this value.
+
+.TP
+.B \-F, \-\-first\-aligned\-in\-largest
+Similar to \fI\-f\fR (\fI\-\-first\-in\-largest\fR), except returns the
+sector number with the current alignment correction applied. Use this
+function if you need to compute the actual partition start point rather
+than a theoretical start point or the actual start point if you set the
+alignment value to 1.
 
 .TP 
 .B \-g, \-\-mbrtogpt
diff --git a/support.cc b/support.cc
index 1711209..7db2f06 100644
--- a/support.cc
+++ b/support.cc
@@ -251,10 +251,10 @@
 
    while (itemNum-- > 0) {
       startPos = endPos + 1;
-      endPos = argument.find(':', startPos);
+      endPos = (int) argument.find(':', startPos);
    }
    if (endPos == (int) string::npos)
-      endPos = argument.length();
+      endPos = (int) argument.length();
    endPos--;
 
    istringstream inString(argument.substr(startPos, endPos - startPos + 1));
@@ -268,10 +268,10 @@
 
    while (itemNum-- > 0) {
       startPos = endPos + 1;
-      endPos = argument.find(':', startPos);
+      endPos = (int) argument.find(':', startPos);
    }
    if (endPos == (int) string::npos)
-      endPos = argument.length();
+      endPos = (int) argument.length();
    endPos--;
 
    return argument.substr(startPos, endPos - startPos + 1);