Check-in [5c99e150ea]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove unique ID; Write short for record ID.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5c99e150ea48e55a0cea44d5064c3c83954727bf
User & Date: stephanie.gawroriski 2019-07-13 17:19:54
Context
2019-07-13
17:37
Add more flags to the Palm ROM. check-in: e089fe1b81 user: stephanie.gawroriski tags: trunk
17:19
Remove unique ID; Write short for record ID. check-in: 5c99e150ea user: stephanie.gawroriski tags: trunk
17:14
Write missing next record list. check-in: 7c8be614a6 user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to bldt/libs/palmos-utils/dev/shadowtail/palmos/PalmDatabaseBuilder.java.

    77     77   	private int _modcount =
    78     78   		0;
    79     79   	
    80     80   	/** The version. */
    81     81   	private int _version =
    82     82   		0;
    83     83   	
    84         -	/** Unique ID seed. */
    85         -	private int _uniqueid =
    86         -		new Random(this._createtime).nextInt();
    87         -	
    88     84   	/**
    89     85   	 * Initializes the database builder.
    90     86   	 *
    91     87   	 * @param __type The database type.
    92     88   	 * @throws NullPointerException On null arguments.
    93     89   	 * @since 2019/07/13
    94     90   	 */
................................................................................
   245    241   		if (__type == null)
   246    242   			throw new NullPointerException("NARG");
   247    243   		
   248    244   		this._type = __type;
   249    245   		return this;
   250    246   	}
   251    247   	
   252         -	/**
   253         -	 * Sets the unique database ID.
   254         -	 *
   255         -	 * @param __id The database ID.
   256         -	 * @return {@code this}.
   257         -	 * @since 2019/07/13
   258         -	 */
   259         -	public final PalmDatabaseBuilder setUniqueId(int __id)
   260         -	{
   261         -		this._uniqueid = __id;
   262         -		return this;
   263         -	}
   264         -	
   265    248   	/**
   266    249   	 * Sets the version number.
   267    250   	 *
   268    251   	 * @param __v The version number.
   269    252   	 * @return {@code this}.
   270    253   	 * @since 2019/07/13
   271    254   	 */
................................................................................
   366    349   		// Type
   367    350   		dos.writeInt(PalmDatabaseBuilder.__fourToInt(this._type));
   368    351   		
   369    352   		// Creator
   370    353   		dos.writeInt(PalmDatabaseBuilder.__fourToInt(this._creator));
   371    354   		
   372    355   		// Unique ID
   373         -		dos.writeInt(this._uniqueid);
          356  +		dos.writeInt(0);
   374    357   		
   375    358   		// Next record list (unused in files)
   376    359   		dos.writeInt(0);
   377    360   		
   378    361   		// Need to work with records now
   379    362   		List<PalmRecord> records = this._records;
   380    363   		int numrecords = records.size();
................................................................................
   393    376   			// Resource entry
   394    377   			if (isrc)
   395    378   			{
   396    379   				// Type
   397    380   				dos.writeInt(PalmDatabaseBuilder.__fourToInt(pr.type));
   398    381   				
   399    382   				// ID
   400         -				dos.writeInt(pr.id);
          383  +				dos.writeShort(pr.id);
   401    384   				
   402    385   				// Offset
   403    386   				dos.writeInt(offset);
   404    387   			}
   405    388   			
   406    389   			// Database entry
   407    390   			else