Skip to content

Commit 85f45ae

Browse files
committed
Add classBits func
Increase version to 2.0
1 parent 18d2380 commit 85f45ae

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

Base.lproj/MainMenu.xib

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17506" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
2+
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
33
<dependencies>
44
<deployment identifier="macosx"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17506"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17701"/>
66
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
77
</dependencies>
88
<objects>
@@ -471,7 +471,7 @@
471471
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
472472
<clipView key="contentView" id="L0l-HJ-flz">
473473
<rect key="frame" x="1" y="1" width="567" height="485"/>
474-
<autoresizingMask key="autoresizingMask"/>
474+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
475475
<subviews>
476476
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" headerView="583" id="586">
477477
<rect key="frame" x="0.0" y="0.0" width="567" height="462"/>

IPSubnetcalc.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,21 @@ class IPSubnetCalc: NSObject {
373373
return (bits)
374374
}
375375

376+
func classBits() -> Int {
377+
let classType = self.netClass()
378+
379+
if (classType == "A") {
380+
return (Constants.classAbits)
381+
}
382+
else if (classType == "B") {
383+
return (Constants.classBbits)
384+
}
385+
else if (classType == "C") {
386+
return (Constants.classCbits)
387+
}
388+
return (32)
389+
}
390+
376391
static func maskBits(maskAddr: String) -> Int {
377392
var bits: Int = 0
378393

SubnetCalc-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.7</string>
18+
<string>2.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>JMUL</string>
2121
<key>CFBundleVersion</key>

0 commit comments

Comments
 (0)