mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 13:29:12 +00:00 
			
		
		
		
	Fix reading aig files on windows
This commit is contained in:
		
							parent
							
								
									3f70c1fd26
								
							
						
					
					
						commit
						9e55b234b4
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -285,6 +285,8 @@ end_of_header:
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		else if (c == 'c') {
 | 
							else if (c == 'c') {
 | 
				
			||||||
			f.ignore(1);
 | 
								f.ignore(1);
 | 
				
			||||||
 | 
								if (f.peek() == '\r')
 | 
				
			||||||
 | 
									f.ignore(1);
 | 
				
			||||||
			if (f.peek() == '\n')
 | 
								if (f.peek() == '\n')
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
			// Else constraint (TODO)
 | 
								// Else constraint (TODO)
 | 
				
			||||||
| 
						 | 
					@ -1062,7 +1064,9 @@ struct AigerFrontend : public Frontend {
 | 
				
			||||||
#ifdef _WIN32
 | 
					#ifdef _WIN32
 | 
				
			||||||
			char fname[_MAX_FNAME];
 | 
								char fname[_MAX_FNAME];
 | 
				
			||||||
			_splitpath(filename.c_str(), NULL /* drive */, NULL /* dir */, fname, NULL /* ext */);
 | 
								_splitpath(filename.c_str(), NULL /* drive */, NULL /* dir */, fname, NULL /* ext */);
 | 
				
			||||||
			module_name = fname;
 | 
								char* bn = strdup(fname);
 | 
				
			||||||
 | 
								module_name = RTLIL::escape_id(bn);
 | 
				
			||||||
 | 
								free(bn);
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
			char* bn = strdup(filename.c_str());
 | 
								char* bn = strdup(filename.c_str());
 | 
				
			||||||
			module_name = RTLIL::escape_id(bn);
 | 
								module_name = RTLIL::escape_id(bn);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue